|
-
Apr 8th, 2006, 03:35 AM
#1
Thread Starter
Frenzied Member
[2005] GDI+ Bitmap Constructor
Hi there,
I'm using this constructor of the bitmap class:
http://msdn2.microsoft.com/en-us/lib...5z(VS.80).aspx
VB Code:
'for example
MyImage = new Bitmap(MyImage, new Point(this.Width, this.Height));
Which takes as one argument an existing bitmap, and as a second argument, the new size. The idea was to expand the accesible area of an existing bitmap, but to my dismay, this causes the image to stretch - not simply increase the overall dimensions. Does anyone know of an easy way to do this that does not involve creating a new bitmap image, and a graphics object, then drawing my current one on there? This will be for a resize event, so as you can imagine, that would be pretty flicker-ific if I had to create and destroy images that often.
Bill
-
Apr 8th, 2006, 05:20 AM
#2
Re: [2005] GDI+ Bitmap Constructor
It only flickers if you use the screen as a storage medium which is always a bad idea. Your idea about drawing the image onto the larger area is correct though. Just do it to a backbuffer first and then draw it to the screen in a custom paint event.
Flicker can be eliminated by using SetStyles() on the screen object you are drawing to.
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|