Где задокументировано реболл (чтобы получить эффект свечения на круглом прямоугольнике)? - PullRequest
0 голосов
/ 23 мая 2010

Здесь обсуждается заполнение ручки http://www.mail-archive.com/rebol-bounce@rebol.com/msg02019.html

Но я не вижу документации о кубическом, алмазном и т. Д. Эффекте для заливки в официальном документе ребола?

Я пытаюсь нарисовать некоторый круглый прямоугольник с эффектом свечения, но не совсем понимаю параметры, с которыми я играю, поэтому не могу получить именно то, что хотел бы (мне бы хотелось, чтобы эффект свечения начинался с центр не из темного левого верхнего угла):

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 голосов
/ 24 мая 2010

Наконец я сделал это, так что не уверен, как мне удалось получить:)

альтернативный текст 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
...