Re: How to change the size of the canvas?
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Apr 2007 00:10:18 +0200
This is simple. You take the new desired size, create an image, get the Graphics object for it. Then, paint the old image to the new graphics object, exchange the new image for the old, destroy the old and continue drawing...
Don't even need code to explain that :-)
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
active wrote:
I have an image that is basically the canvas that the user draws on..
He may also be making changes to the Graphics object that is used to draw on the canvas.
Then he wants to make the canvas bigger and continue drawing.
I know how to create the bigger Image and draw the old picture on it and create a new Graphics object from the new Image.
However, I don't know how to make the new Image and Graphic object reflect changes in properties he may have made.
Any suggestions
Thank
- Follow-Ups:
- Re: How to change the size of the canvas?
- From: active
- Re: How to change the size of the canvas?
- References:
- How to change the size of the canvas?
- From: active
- How to change the size of the canvas?
- Prev by Date: Re: Flicker, even with BufferedGraphicsContext
- Next by Date: Re: Image caching and graphics resources...
- Previous by thread: How to change the size of the canvas?
- Next by thread: Re: How to change the size of the canvas?
- Index(es):
Relevant Pages
|