Changes

Jump to: navigation, search

Using Bitmaps for Persistent Graphics in C Sharp

26 bytes added, 18:44, 17 September 2010
Drawing onto the Bitmap
== Drawing onto the Bitmap ==
Now that we have our object we can draw onto it using the Graphics Object just as we would writing to any other graphics object (for details on drawing to a graphics object read [[Drawing Graphics in CSharp|Drawing Graphics in C#]]).
In this example we will create Pen and Rectangle objects and use them to draw an ellipse:
</pre>
When compiled and executed the code will create the bitmap in memory, create a Graphics Object associated with the bitmap and draw an ellipse into the bitmap image. It will not, at this point, display anything to user because the bitmap is still just an image sitting in memory. The next task is to wire up the Paint() event to render the bitmap into the Graphics Object of our form.
== Rendering a Bitmap Image on a Control ==

Navigation menu