Re: Best Way to Rotate
Re: Best Way to Rotate
- Subject: Re: Best Way to Rotate
- From: Gordon Apple <email@hidden>
- Date: Sun, 28 Oct 2007 12:10:56 -0500
Sorry, I wasn't totally clear that I was talking about a stationary draw
object. However, your answer is relevant because I would like to eventually
do some fancy animations like spinning a half-screen-centered QTMovie up to
a reduced size position in the corner.
I decided I was trying to make the rendering problem too hard. Instead,
except for the applied transform, I'm going to keep the rendering as simple
as possible and put the computational burden on the create/edit phase. One
implication is that I will need to store a separate drawing bounds rect for
draw-decision testing and for invalidation. The create/edit code is where I
will need to rotate a copy of the Bezier as part of computing the drawing
bounds that will be needed later in the rendering.
If I transform before drawing the shape, that should also handle
contained text (using my own container flow object) or an NSImage. I'm
still not clear on how to handle a contained QTMovie, but I'll research that
more thoroughly when I get there.
> On Oct 27, 2007, at 2:17 PM, Gordon Apple wrote:
>
>> 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?
>
> My instinct is to rotate the coordinates, but that's without knowing
> much about your requirements.
>
>
>> 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.
>
> CoreAnimation is likely an ideal solution for you if you can target
> Leopard. It will handle all the media types and will do all of the
> rotation math for you.
>
> - Scott
_______________________________________________
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