Best Way to Rotate
Best Way to Rotate
- Subject: Best Way to Rotate
- From: Gordon Apple <email@hidden>
- Date: Sat, 27 Oct 2007 16:17:25 -0500
Now that I've got my data structure handling down to functional, I'm
focusing on other things, like how to actually draw something useful. I'm
creating a shape rendering object (no shape creation yet) and am wrestling
with how much should be done in rendering and how much in creation (i.e.,
creating/drawing the shapes).
I like the idea of each shape (at least ones having fill/content) having
its own coordinate system. Maybe that's not the best approach. Shapes can
contain a shader, an NSImage, a QTMovie, text etc. The philosophy of
rotation has now become an issue: Rotate the Bezier or rotate the
coordinates?
Rotating the Bezier had advantages, one being that you can then easily
get its bounds when needed. Rotating the coordinates creates problems for a
Bezier in determining bounds, especially if it contains curved segments. In
the latter case, it appears that the only solution is to also rotate a copy
of the Bezier so you can ask for its bounds.
I don's see a way to rotate an NSImage, so it looks like rotating
coordinates is de rigueur. OTOH, rotating coordinates for drawing isn't
going to work for a QTMovie. The movie is expected to play and be clipped
rotated regardless of what else is going on, so the movie object itself has
to be rotated. I assume that text will do ok in coordinate rotation, so I
don't think that's an issue.
Any thoughts on these issues. Am I just going to have to handle each
content type independently like I described?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden