Re: Drawing in CALayers
Re: Drawing in CALayers
- Subject: Re: Drawing in CALayers
- From: Gordon Apple <email@hidden>
- Date: Wed, 18 Jun 2008 20:29:55 -0500
Addendum: I did implement my own transform to flip the drawing. As far
as I can tell, the "initialFlippedState" parameter in NSGraphicsContext
*)graphicsContextWithGraphicsPort:(void *)graphicsPort
flipped:(BOOL)initialFlippedState has no impact whatsoever. Bug report
time?
Another thing that does not seem to work is CALayer's
setNeedsDisplayInRect:. SetNeedsDisplay does work and updates the visible
layer while you draw or modify a shape. Apparently, setNeedsDisplayInRect
is intended to accumulate calls until something flushes it to the screen. I
tried using "display" even though the ref. Doc. says don't call it, and the
new Hillegasse book does it anyway, but it didn't help.
> At the present time, I'm not doing animation. I just want a layer stack
> I can draw into, with one layer for previous drawings and one normal user
> drawing activities. Later, I want to add more layers for user annotation
> and (possibly animated) attention directors. So far, I haven't even been
> able to get the drawing right-side-up, no matter what I tell the context.
> The underlying view uses flipped coordinates, mainly because some objects
> use text and NSLayoutManager just doesn't work with un-flipped views. I
> also haven't been able to get visual feedback when drawing a shape. I'm
> sure I'll eventually figure it out, but it's not as easy as I thought it
> would be.
_______________________________________________
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