draw question
[1/4] from: gchiu:compkarori at: 14-Sep-2001 7:19
Here it is again ....
quick question:
What do I need to change to get my "circles" to draw across
the edges of the grid. The top left hand one is truncated.
REBOL []
polished: load-thru/binary http://www.cybarite.com/public/polished.png
palms: load-thru/binary http://www.rebol.com/view/palms.jpg
view layout [size 400x400
backtile polished gold
image 360x360 palms effect [ fit grid 20x20
draw
[ pen 200.0.0
fill-pen black circle 100x100 9
fill-pen white circle 200x200 9
fill-pen black circle 0x0 9
fill-pen white circle 100x120 9
]
]
]
--
Graham Chiu
[2/4] from: greggirwin::starband::net at: 13-Sep-2001 14:49
Hi Graham,
<< What do I need to change to get my "circles" to draw across
the edges of the grid. The top left hand one is truncated. >>
Well, you're drawing on the image face, so anything you draw on there
is going to be clipped to its boundaries. If you want to go outside
those boundaries, I think you'll need to draw on another face. This
shows drawing on the backdrop to accomplish the task. Note that it
isn't "smart" in any way. I just pasted your draw commands so they
occur for both the backdrop and the image.
REBOL []
polished: load-thru/binary http://www.cybarite.com/public/polished.png
palms: load-thru/binary http://www.rebol.com/view/palms.jpg
pic-offset: 20x20
view layout [ size 400x400
backdrop polished gold effect [tile
draw [
pen 200.0.0
fill-pen black circle (100x100 + pic-offset) 9
fill-pen white circle (200x200 + pic-offset) 9
fill-pen black circle (0x0 + pic-offset) 9
fill-pen white circle (100x120 + pic-offset) 9
]
]
at pic-offset
image 360x360 palms effect [fit grid 20x20
draw [
pen 200.0.0
fill-pen black circle 100x100 9
fill-pen white circle 200x200 9
fill-pen black circle 0x0 9
fill-pen white circle 100x120 9
]
]
]
--Gregg
[3/4] from: gchiu:compkarori at: 14-Sep-2001 22:16
> those boundaries, I think you'll need to draw on another
> face. This
Thanks for that Gregg.
I've got it this far now:
view layout [
size 400x400
backdrop polished gold effect [tile ]
at pic-offset image 360x360 palms effect [ fit grid
20x20 ]
at 0x0 box 400x400 effect [
draw [ pen 200.0.0
fill-pen black circle (100x100 + pic-offset) 9
fill-pen white circle (200x200 + pic-offset) 9
fill-pen black circle (0x0 + pic-offset) 9
fill-pen white circle (100x120 + pic-offset) 9
]
]
]
--
Graham Chiu
[4/4] from: greggirwin:starband at: 14-Sep-2001 9:16
Hi Graham,
Cool! So you just create a transparent box over it and draw on that. Nifty.
--Gregg