Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/samples/simple-curve.rb
blob: c8a9910413e791d3a62a4acc2a39a937cb8e215b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
# based on the cairo curve_to example
# http://www.cairographics.org/samples/curve_to/
#
Shoes.app do  
  x, y = 25.6, 128.0
  x1 = 102.4; y1 = 230.4
  x2 = 153.6; y2 = 25.6
  x3 = 230.4; y3 = 128.0

  nofill
  strokewidth 10.0
  shape do
    move_to x, y
    curve_to x1, y1, x2, y2, x3, y3
  end

  strokewidth 6.0
  stroke rgb(1.0, 0.2, 0.2, 0.6)
  shape do
    move_to x, y
    line_to x1, y1
    move_to x2, y2
    line_to x3, y3
  end
end