• 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
Best place to create CGLayers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best place to create CGLayers


  • Subject: Best place to create CGLayers
  • From: Paul Sinclair <email@hidden>
  • Date: Wed, 8 Jun 2005 12:52:00 -0700 (PDT)

I have overridden NSView and I want to create some
CGLayers for some animated drawing.  I am calling:

[[NSGraphicsContext currentContext] graphicsPort]

...to get the CGContextRef for the call to
CGLayerCreateWithContext().

I can't call the graphicsPort method mentioned above
inside my NSView initWithFrame override since the
port/context isn't available yet.  I don't want to
create my CGLayers in my NSView drawRect override.

Where is the best place to create my CGLayers?  When
is that context finally available (when will the
graphicsPort call not return nil)?




__________________________________
Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online and more. Check it out!
http://discover.yahoo.com/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Archive without compression
  • Next by Date: Re: self
  • Previous by thread: Re: Archive without compression
  • Next by thread: Re: Best place to create CGLayers
  • Index(es):
    • Date
    • Thread