• 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: Drawing an NSImage in a CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing an NSImage in a CALayer


  • Subject: Re: Drawing an NSImage in a CALayer
  • From: David Duncan <email@hidden>
  • Date: Thu, 18 Sep 2008 15:16:39 -0700

On Sep 18, 2008, at 2:54 PM, Brad Gibbs wrote:

I'm trying to draw an NSImage (a PNG) in a CALayer. The goal is to create a method that allows me to pass an NSImage as an argument to create a layer-hosting view. I have:

Where is this PNG originating? The answer may mean a simpler (and potentially faster) method can be used...


[imageLayer drawLayer:imageLayer inContext:ctx];

You don't call this function yourself. You set the delegate on the CALayer and you implement this method. When the CALayer needs image content it will be called automatically with the correct parameters. This is usually as a result of a -display message being sent to the layer (which is typically arranged for by sending -setNeedsDisplay).
--
David Duncan
Apple DTS Animation and Printing


_______________________________________________

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


  • Follow-Ups:
    • Re: Drawing an NSImage in a CALayer
      • From: Brad Gibbs <email@hidden>
References: 
 >Drawing an NSImage in a CALayer (From: Brad Gibbs <email@hidden>)

  • Prev by Date: Re: Differences between -isEqual: and -isEqualTo:?
  • Next by Date: Re: Drawing an NSImage in a CALayer
  • Previous by thread: Drawing an NSImage in a CALayer
  • Next by thread: Re: Drawing an NSImage in a CALayer
  • Index(es):
    • Date
    • Thread