Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (24 sloc) 1011 Bytes

shape

We can create arbitrary shapes, starting at the coordinates (left, top).

# sample23.rb
Shoes.app :width => 140, :height => 120 do
  fill yellow
  shape :left => 30, :top => 30 do
    line_to 50, 30
    curve_to 100, 100, 10, 20, 100, 50
    line_to 20, 100
    line_to 30, 30
  end
end

sample23.png

sample23.png

There seems to be a bug with Shoes-0.r925. Please note the difference in the two screenshots, where the above was taken using Shoes-0.r905 and the second one using Shoes-0.r925.

sample23-1.png

sample23-1.png

From Shoes version 0.r-970 it seems to be working again, although the result doesn't exactly look like the first image. After Shoes-0.r970 we are back to the 0.r-925 behavior.

Policeman

The sample23.rb worked well with Shoes-0.r1263. The snapshot is the same as sample23-1.png.