你将如何在 Rebol 中绘制一个圆角矩形并用渐变颜色填充它?找不到任何例子。
谢谢。
您必须在效果块中为面使用 DRAW:
view layout [
box effect [ ; default box face size is 100x100
draw [
; information for the next draw element (not required)
line-width 2.5 ; number of pixels in width of the border
pen black ; color of the edge of the next draw element
; fill pen is a little complex:
fill-pen 10x10 0 90 0 1 1 0.0.0 255.0.0 255.0.255
; the draw element
box ; another box drawn as an effect
5 ; size of rounding in pixels
10x10 ; upper left corner
90x90 ; lower right corner
]
]
]
要研究如何使用具有不同颜色和渐变模式的 FILL-PEN,请前往 REBOL 桌面下的 REBOL 和工具并尝试 Grad Lab。您可以使用可见的源代码尝试不同的设置,您可以将其粘贴到自己的绘图块中。
希望这可以帮助。:-)
记得点击桌面左下角的“Local”文字,否则无法上线获取index.r文件。