I'm drawing a rectangle on a graphics surface using Graphics.DrawRectangle method. I want to be able to change the size of it several times, programmatically. What is the best way to get rid of the old size on the graphics object, before drawing it's new size???
Please help
Last edited by phirestalker; March 13th, 2003 at 05:56 PM.
what I mean is I draw a rectangle on the screen, and then I need to resize it on the screen. if I call the DrawRectangle again with the new size, it will then have 2 rectangles on the screen, I do not want the first rectangle when I draw the second one with the new size. What's the best way to delete the first one from the screen (when there is other stuff on the screen behind it)??
I know of Graphics.Save and Graphics.Restore, but I was hoping for a different way
Last edited by phirestalker; March 14th, 2003 at 02:01 PM.
ok I thought of that, but if I am going to be doing this a couple times per second, won't calling that cause a flicker effect? I am looking through the help, and I am trying to find a way to store what is where I'm going to draw the rectangle and save it before I draw it, and then when I go to draw a new rectangle I do the same thing, but first replace what was behind the first rectangle and then save behind the new one again and so on. The reason I need to do this, is I am writing a class SelectionBox to draw the equivelent of what a lot of windows programs have, I want this class to keep track of itself as an OBJECT like all classes should, so that only ONE rectangle is on the screen at a time for each instance, and each instance can be moved individualy
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.