Shoezies:
This code produces two bright squares, meaning two pairs of grey squares on top
of each other:
Shoes.app do
nostroke
background rgb(0, 0, 0)
fill rgb(200, 200, 200, 75)
rect(10, 10, 50, 50, 6) # rounded one in correct location
shape 0, 0 do # square one starts at 10
move_to 10, 10
line_to 60, 10
line_to 60, 60
line_to 10, 60
end
rect(100, 100, 50, 50, 6)
shape do # square two starts at 100
move_to 100, 100
line_to 150, 100
line_to 150, 150
line_to 100, 150
end
end
The fix is apparently to treat the first argument as setting the origin for the
shape. No origin puts the shape at the default location.
If we go with this behavior as shape's official interface (if this is a feature,
not a bug), then why doesn't the source code reflect this? I could not port the
move_to() line into shoes_canvas_shape(), even though the call was exactly the
same. And shouldn't a translate{} method be responsible for re-origining entire
groups of items?
--
Phlip