[Laszlo-user] Font selection, file open dialog and capturing the canvas image

Rich Christiansen warproof at warproof.com
Tue Oct 2 14:15:24 PDT 2007


I'm excited to hear what you find as I'm interested in these issues as well.

I can provide partial help regarding 3 and 4 below:

Mike Pence wrote:
> Hey guys,
>
> I am happy to be having some work to do with Laszlo after too-long of
> an absence.
>
> A few questions for the applet I am currently working on, which I am
> hoping someone can help me out with:
>
> 1. Is there a file open dialog function for Laszlo? I want users to be
> able to select an image file to use off of their local drive.
>
> 2. Is there any boilerplate code for offering a font selection dialog
> or dropdown?
>
> 3. What about explicit z-order manipulation? Z-order seems to
> currently be determined by order of view creation, with newer views
> atop older views.
>   
The only way to explicitly change z-order that I know of is the 
bringToFront() method (I believe there is a sendToBack() method as 
well).  Other than that, I've noticed the exact same behavior as you 
regarding new views being placed above older views.
> 4. Once users have finished doing some image scaling and arranging, I
> want to be able to capture their work and save it as a jpg or png --
> the autmated equivalent of a screen grab or capture. Is there an easy
> way to do this, like canvas.saveRectToFile (wishful thinking,
> probably).
>   
I would be ecstatic if there were some way to do this.  If there is, 
please let us know, someone! :)  In an app I'm working on, I need 
similar functionality.  What I'm planning on doing is using iText to 
create PDFs from the coordinates and resource files/text snippets 
created by the user in the OL app.  Of course, I need to create 
vector-based PDFs suitable for printing.  It may be easier to do with a 
different app (e.g. ImageMagick) if you only need a raster-based solution.

Let me know what you find! :)
-Rich
> 5. How are ActionScript methods called form OL?
>
> Thanks for any pointers. I will be spending the next several hours
> figuring these things out. I will post results here, unless somebody
> wants to beat me to it.
>
> Best,
> Mike Pence
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20071002/74b90287/attachment.html


More information about the Laszlo-user mailing list