Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Capturing transparent faces.

From: petr:krenzelok:trz:cz at: 25-Jun-2005 22:09

Carl Read wrote:
>Hi all, > >If you have a transparent face in View, it can be used to grab an image of the faces under it. However, I can only get this to work on a layout in an open window - when I attempt it on layout, all I get is a black image. > >Here's an example of this: Just run it, click on the "Grab Area" button and you'll see what I mean... > >rebol [] >lo: layout [ > title "Grab area test." > at 30x20 > b: box 80x30 with [color: none] ; Transparent box. > button "Grab Area" [ > window-grab: to-image b > unview/all > ] >] >lo-grab: to-image b >
Look, I am no guru at View, but imo following happens. Feel free to correct me eventually: you create snapshot of 'b (lo-grab), even before it is being shown for the first time. Imo layout just defines structures, but does not apply effect, until the face is actually shown. But - even if you first apply view lo and then "lo-grab: to-image b", you apply 'unview after the button press. 'lo object still remains in memory, but who knows what 'unview causes internally. Better ask some guru ... -pekr-