Monday, July 13, 2009

- Trying to place some kind of blindingly obvious effect around a score element when it is selected. This is a little difficult because the elements are all bits of a larger drawing for efficiency, and the larger drawing is translated and scaled automatically.
- Individual drawings can be animated so long as they're not frozen. I can create a new drawing (such as a rectangle) and add it to the selected score element's parent which takes care of coordinate translation to place it over/around the element. I can then animate the drawing; yay for spinning rectangles.
- First attempt resulted in a cluster of little red rectangles orbiting around the screen with the score jumping and spinning everywhere to stay out of the way. Not quite the desired result... The rectangle rotation origin needs to be fixed to the centre of itself, not the top left corner of the canvas. Setting the RotateTransform CenterX and CenterY to the centre point of the element bounds fixed it.
- Spinny red rectangles on selected element on score finished.
- Need to remove rectangles when not in use. They currently sit around and spin forever after I lose reference to them.
- Now holding on to selection rectangle and its parent, will be easy to remove.

No comments:

Post a Comment