rebol fill-pen在哪里记录(以获得圆形矩形的发光效果)?

时间:2010-05-23 16:10:10

标签: rebol

这里有一些关于填充笔的讨论 http://www.mail-archive.com/rebol-bounce@rebol.com/msg02019.html

但是我看不到关于立方体,钻石等的文档......对于rebol官方文档中的填充笔的影响?

我正在尝试绘制一些具有发光效果的圆形矩形,但是我并不真正理解我正在玩的参数,所以我无法得到我想要的(我希望从中心不是从黑暗的左上角):

view layout [
    box 278x185 effect [ ; default box face size is 100x100
      draw [
        anti-alias on
        ; 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
        fill-pen radial 20x20 5 55 5 5 10 0.0.0 55.0.5 55.0.5

        ; the draw element
        box     ; another box drawn as an effect
          15     ; size of rounding in pixels
          0x0 ; upper left corner
          278x170 ; lower right corner
      ]
    ]
]

1 个答案:

答案 0 :(得分:0)

最后我做到了,所以不确定我是如何设法获得的:)

alt text http://reboltutorial.com/files/2010/05/create-free-banner.png

view banner: layout/size [
    ;layout (window client area) size is 278x170 at the end of the spec block
    at 0x0 ;put the banner on the top left corner
    box 278x170 effect [ ; default box face size is 100x100
      draw [
        anti-alias on
        ; 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
        ;fill-pen radial 100x50 5 55 5 5 10 55.0.5 30.10.10 55.0.5
        ;fill-pen radial 100x50 5 55 5 10 10 55.0.5 30.10.10 71.0.6
        fill-pen radial 100x50 5 55 5 10 10 71.0.6 30.10.10 71.0.6

        ; the draw element
        box     ; another box drawn as an effect
          15     ; size of rounding in pixels
          0x0 ; upper left corner
          278x170 ; lower right corner
      ]
    ]
    pad 30x-150
    Text "Experiment" font [name: "Impact" size: 24 color: white]
    image http://www.rebol.com/graphics/reb-logo.gif
] 278x170