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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to