-
Notifications
You must be signed in to change notification settings - Fork 46
Polygon
shairontoledo edited this page Mar 28, 2011
·
1 revision
Draws one shape based on relative node points.
Options
- :x and :y – Initial position.
- :content – Facade to ShapeContent with same parameters.
- :border – Facade to Border with same parameters.
Examples
doc.polygon :x => 3.5, :y => 5.5 do
node :x => 4, :y => 0
node :x => 0, :y => -4
node :x => -4, :y => 0
node :x => 0, :y => 4
end
doc.polygon :x => 3.5, :y => 4.5 do
node :x => 2, :y => 2
node :x => 2, :y => -2
node :x => -2, :y => -2
end
doc.polygon :x => 1, :y => 5, :border => {:width => 2, :linejoin => 1} do
node :x => 2, :y => 2/2
node :x => 2*2,:y => -2
node :x => -1, :y => -3
node :x => 2, :y => 1
node :x => 3, :y => 2
end