This makes a pretty pinwheel:

Shoes.app :width => 500, :height => 500 do
  animate 10 do
    rotate 7
    line( 100, 100, 200, 200 )
  end
end

At first glance I don't understand why. The first time through the "animate" loop, the line is rotated 7 degrees from where it would have been drawn. The second time, it is rotated 14 degrees, and so on.

Where does that stored rotation live? Is there a "rotation value" in the slot, which affects everything that is drawn within it? That seems to be the case. And "rotate" doesn't *set* that rotation value, it *increments* it? That's counterintuitive to me. Is there any way to "get" that value? To reset it to zero?

Trying this I found that that rotation value seems to be specific to the slot:

Only the first slot's contents are affected by the "rotate."

I guess a question to _why -- is it a bug that "rotate" adds to previous "rotates" in the same slot? Or is that intended behavior? It sure seems weird to me.

Reply via email to