[EMAIL PROTECTED] wrote:
Subject: Re: Saving the image in a canvas
From: Brian Heibert <[EMAIL PROTECTED]>
Date: Sun, 23 Apr 2006 09:18:06 -0500

I am using 2D Draw from someone on this list
well I think when the picture is drawn in the paint part of the program it's Canvas.Paint
but when you import a picture to the paint field it's canvas.backdrop

False, sorry! You are able to do what you want.


But, everything you draw "in the Paint Event" is there until the next refresh... and lost after that if the code is not called _by_ the Paint event.


What people says here (in the Getting Started list / in the NUG List) since the last seven years is to use an Offscreen Picture and assign it to the Canvas (or Window) Backdrop:

Canvas1.Backdrop = OffscreenPict


other adventage is that once you draw everything in the OffscreenPict, you can save the Canvas contents using:

f.SaveAsPicture OffscreenPict


isn't life sunny sometimes ?

BTW: you create the OffscreenPict, draw to it (OffscreenPict.Graphics.<draw-what-you-want>) and assign it (see above) to the Canvas or Window Backdrop.

At last, if you want to implement drag and drop on your canvas/window, use the Backdrop property...


Now, if your questions in reality are: why do I not found these ansers in the documentation... Express yourself according your thinking.

REALbasic documentation is better than Apple Mac OS X 10.4, but by a hair width, not more :(
[yes, this is to say both are bad; but things can go worst :( OR BETTER :)]


Emile


PS: some Language Reference quotes:

Window.Backdrop Property

Syntax
Backdrop as Picture


A picture object that will be drawn in the window when the window opens.



Canvas.Backdrop Property

Syntax
Backdrop as Picture


The Picture that will automatically be drawn into the area. Must be a PICT on Macintosh or BMP or PNG on Windows and Linux unless the user has QuickTime installed (Windows and Macintosh only).



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to