I want to know how to change the background color when I generate the image dynamically.
Changing a picture's background color is super easy and fast using Fotor's online background color changer. Simply click the "Change Background Color Now" button on this page. Click "Open Image" to upload the picture you want to change background color. Or directly drag the photo to the editing area.
glClearColor(0,0,1,0); then recompile the program and run it. The background of the OpenGL window should be blue. Colors in OpenGL are typically represented in RGB or RGBA mode.
To change the default background color in Inkscape, open up the Document Properties menu by pressing Control + Shift + D, then click on “Background color” and set it to any color you'd like using the menu interface.
Just use the Graphics object .Clear()
method, passing the color you wish to use for the background.
For example:
g.Clear(Color.Blue);
It's simple:
Graphics graph = Graphics.FromImage(bitmap);
graph.Clear(Color.Yellow); // set color for background
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With