Hmm, you are right. This is going to need some
more investigation and probably will go into
Rambo.
(I think I remember this problem from years ago...)

A possible workaround *may* be to do it by setting b/saved-area
to what the background should be.

Or else you must view the window to render the effects:

window: layout [
        t: text "I am text underneath" effect [merge luma 20]
        at 10x10
        b: box "hello" with [color: none] effect [merge gradmul 120.120.120
150.140.130]
]
view/new/offset window -1000x-1000 ; necessary for win-offset? to work (uses
parent-face)
image: copy/part skip to-image window win-offset? b b/size
unview/only window
view layout [image (image)]

Not entirely satisfactory, since a window is created and destroyed
in a flicker. If you have many faces to do, then there is a flickering
user interface. Perhaps to alleviate this an already open window can
be used, though I suspect clipping will not allow faces with negative
offsets to be rendered properly.

Anton.

> 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
> view lo
> view layout [
>     backdrop green
>     text "Image grab from layout..."
>     image lo-grab
>     text "Image grab from window..."
>     image window-grab
> ]
>
>
> So, is there a way to do this on just a layout?
>
> Thanks in advance,
>
> -- Carl Read.

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to