Monday, 24 December 2012

Rebol Draw on Linux

Rebol works very well on  Linux, even DRAW, look these examples:

Iphone button


sz: 200x400
img: make image! sz
img/alpha: 255
draw img compose [
  pen none
  fill-pen linear (as-pair 0 sz/y / 2) -50.5 70.5 90.0 1.0 1.0
        45.45.47 9.9.11 108.113.117
  circle (as-pair sz/x - 115 sz/y / 2) 70.5
  fill-pen 1.0.5
  circle (as-pair sz/x - 115 sz/y / 2) 68.5
  reset-matrix
  fill-pen linear (as-pair sz/x - 115 sz/y / 2) -60.5 30.5 45.0 1.0 1.0
        161.164.169 161.164.169 89.94.100
  box (as-pair sz/x - 115 - 26 sz/y / 2 - 26) (as-pair sz/x - 115 + 26 sz/y / 2 + 26) 10.0
  fill-pen 1.0.5
  box (as-pair sz/x - 115 - 22 sz/y / 2 - 22) (as-pair sz/x - 115 + 22 sz/y / 2 + 22) 6.0
  reset-matrix
  fill-pen linear (as-pair 0 sz/y / 2 - 26) -50.5 100.5 90.0 1.0 1.0
        1.0.5.255 200.214.226.224 200.214.226.128
  shape [
    move 154x200
    arc 16x200 68.0 68.0
    arc 154x200 -149.0 68.0
  ]
]
view layout [
  backdrop 1.0.5
  image img
]

and neon effect:





my-font: make face/font [
name: "/usr/share/fonts/truetype/freefont/FreeSans.ttf"
;with your path to font you want to use
size: 64
style: [bold]
]
neon: "REBOL BAR"
coord: 30x15
inc: 0.25.25
draw-block: compose [
  line-join round font my-font
  pen (inc * 1 + 255.0.0.230) line-width 11 text vectorial coord neon
  pen (inc * 2 + 255.0.0.205) line-width 9 text vectorial coord neon
  pen (inc * 3 + 255.0.0.180) line-width 8 text vectorial coord neon
  pen (inc * 4 + 255.0.0.155) line-width 7 text vectorial coord neon
  pen (inc * 5 + 255.0.0.130) line-width 6 text vectorial coord neon
  pen (inc * 6 + 255.0.0.105) line-width 5 text vectorial coord neon
  pen (inc * 7 + 255.0.0.80) line-width 4 text vectorial coord neon
  pen (inc * 8 + 255.0.0.55) line-width 3 text vectorial coord neon
  pen (inc * 9 + 255.0.0.30) line-width 2 text vectorial coord neon
  pen (inc * 10 + 255.0.0.5) line-width 1 text vectorial coord neon
]
view/title layout [box black 450x200 effect [ draw draw-block ] ] "NEON"

No comments:

Post a Comment