From Graphics to Image
Richard Kucia <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <052120071331.11599.46519F280002E57A00002D4F21587667550E070C9A05069D@att.net> |
I have a working application which draws a graph on a PictureBox using the Graphics object. The method is in the Paint event of the PictureBox. Works fine. I would prefer to use the same drawing algorithm and capture the result in a Image/Bitmap object. My theory is that the conditions that would cause the graph to change are relatively rare, and therefore my app would perform better by computing the graph once and avoiding the computation in the overridden Paint method. Plus, it will be easy to save the Image to a file, if that become a future requirement. So how do I capture the result into an Image/Bitmap object? Thanks. Rick Kucia