Make Image of a Layout
[1/4] from: info::id-net::ch at: 26-Sep-2002 11:11
Is it easy to make a "make image" of a face, a pane or a layout ?
How can I make it ?
Philippe Oehler
[2/4] from: brett:codeconscious at: 26-Sep-2002 19:33
Me first me first!
img: to-image layout [Title "Ta Da!"]
save/png %img.png img
Regards,
Brett.
[3/4] from: anton:lexicon at: 26-Sep-2002 20:23
Yes. Use 'to-image.
layout returns a face (which is an object, with type = 'face).
img: to-image layout [origin 0 title "Big Train"]
save/png %image.png img
view layout [image img]
It would be nice if to-image could accept a pane block
but it appears that it cannot at this time.
Anton.
[4/4] from: jason:cunliffe:verizon at: 26-Sep-2002 16:29
Anton wrote:
> img: to-image layout [origin 0 title "Big Train"]
>
> save/png %image.png img
>
> view layout [image img]
>
> It would be nice if to-image could accept a pane block
> but it appears that it cannot at this time.
How do you get the coordinates, width, height of a pane?
If so, should be simple to write a nice save-pane function which captures then
crops the layout's image correctly to the pane's.
./Jason