Replying to my own post...

On 05-Sep-02, Carl Read wrote:

> Try this...

> rebol []

> ; This function just makes an image from a layout...
> make-die: func [color [tuple!] /local image][
>    layout [
>        image: box 30x30 effect [draw [
>            pen none
>            fill-pen color none
>            circle 14x14 15
>        ]]
>    ]
>    to-image image
> ]

> Board-elements: Stylize [
>    black-square: box 100.100.100 50x50
>    white-square: box white 50x50
>    ; 'die is now an image - note the 'key effect used
>    ; to make the black in the image transparent.
>    die: image make-die red effect [key 0.0.0]
> ]

[snip]

That could be simplified by using an oval in a box, thus not requiring
you to use an image.  ie, the function could be tossed.  So, 'die
could be...

die: box 30x30 effect [key 0.0.0 oval]

and then you'd only need to change the dice' colors instead of
creating a new image each time.  That said, prettier dice could be
created by using draw...

-- 
Carl Read

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to