It should be obvious and easy but I can’t find the way to:
Having a canvas with images and text, etc, I want to copy the full canvas image to another canvas at reduced size. Should be as easy as:
a canvas is basically a non-persistent object, hence the use of the PAINT event.
So instead of drawing to the first canvas, create a PICTURE object and display IT instead
So, create a pict and then display it in the first canvas, then reduce the pict and display in the second canvas? because there is not a way to get the picture from the canvas 1.
thanks Dave, the problem was I would get the picture from the canvas but I should first create a global picture fill it and then draw into the first canvas, then Draw to the second canvas scaling it. It works now, I tried to avoid another global.
Maybe you can consider the DrawInto method for that too? You can find the documentation about it here[/quote]
You’re right this works without a global or window global
[quote]Sub Paint(g As Graphics, areas() As REALbasic.Rect) Handles Paint
Var p As New Picture(Canvas1.Width, Canvas1.Height)
Canvas1.DrawInto(p.Graphics, 0, 0)
if p <> nil then
g.DrawPicture(p,0,0,me.width,me.height, 0,0, p.Width,p.Height)
end if