• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa-dev Digest, Vol 5, Issue 1071
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 5, Issue 1071


  • Subject: Re: Cocoa-dev Digest, Vol 5, Issue 1071
  • From: Gordon Apple <email@hidden>
  • Date: Tue, 17 Jun 2008 18:02:07 -0500

    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.

> I am a little bit confused by Scott's statement that "if you use
> layers-hosting views, then you should not rely on view drawing at all ...
> conversely, if you use layer-backed views then you should not directly access
> the views."
>
> I may just misunderstand what Scott means, but I have used layer-backed views
> with great success.  In a typical scenario, I implement a custom NSView
> subclass just like I would before Core Animation Layers.  To animate the
> view's drawing, I use a timer to trigger calls to -setNeedsDisplay: and
> implement -drawRect: to draw whatever stage of the animation is appropriate
> based on the current time. I have not had any problems when my ordinary custom
> views become layer backed... I don't think...  And I get transparency and
> layering over opengl content for "free" with layer-backed views.
>
> I used to do similar things before Core Animation too.  Apple provided an
> "overlay view" sample that did the same things.
>

_______________________________________________

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

  • Prev by Date: Re: NSDocument and default file names.
  • Next by Date: Re: Rethinking my approach; rather overwhelmed.
  • Previous by thread: Re: Keys dependent on NSArrayController's selection
  • Next by thread: objects aren't added to NSMutableArray
  • Index(es):
    • Date
    • Thread