Can I draw witohut knowing what the size would end up being?

G

Guest

I've got a problem where I need to create an image so I can draw to some
"offline" graphics object and in order to create that image I need to specify
size but I will not know size until I'm done drawing...

Is there any way I can just draw to something that doesn't have a size and
then crate a cropped image out fo that?
 
D

Dave Sexton

Hi,

I see three choices:

1. Create the drawing surface (image) so that it's as big as the biggest
drawing that you will ever expect
2. Calculate the size of the drawing first
3. Create an initial buffer of the average image size in your application.
If you need to draw oustide the boundaries of the image, create a new
drawing buffer sized to some acceptable factor (like [·2,]), and then
copy the current buffer to the new surface - dispose of the initial buffer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top