The rotate command i开发者_C百科n shoes rotates the entire canvas around its upper left corner. I only want to rotate a line (or other shape) around its own corner, though. How do I do that?
Rotate does not really rotate the already drawn figure etc. You actually apply it to the "pen" drawing on the canvas before the begining of the drawing it is like to turn your page on which you draw by some angle. You should therefore use it like that:
Shoes.app do
line 20,20, 50, 50
rotate 90
stroke red
line 20,20,50,50
end
Notice the difference between red and black line
精彩评论