In a canvas I load an image, then I write a text or draw something in paint, how can I copy everything on another picture so that I can use it for a pdf, to copy it to another camvas or more. I tried these two ways to view everything in another canvas but only the loaded image is displayed
dim p as Picture
canvas1.Refresh
1)
p=Canvas1.Backdrop
canvas2.Backdrop=p
2)
Canvas1.DrawInto (p.Graphics,0,0)
canvas2.Backdrop=p
which is the right solution?
Mario
When using the paint event, the content is not available via the Canvas’s Backdrop property. You should draw to a Picture object which you can make available via a property or method, then draw that to the Canvas in Paint.
thank you for the advice Anthony, i tried with this code but i get an error for every line
I have to write the character “O” in a previously calculated x and y coordinate
I load the image first
p=Picture.Open(f)
rem load ok if I use Canvas1.Backdrop = p i see the image on the canvas
p.Graphics.FontName = “Arial”
p.Graphics.DrawingColor = &cFF0000
p.Graphics.FontSize = 20
p.Graphics.Bold=true
p.Graphics.DrawText “O”,x,y
Canvas1.Backdrop=p
where am i wrong?
Mario