> On Jan 7, 2015, at 8:02 AM, Luc Van Bogaert <luc.van.boga...@me.com> wrote:
> 
> For instance, I have already been able to create and add sublayers to a 
> layer-backed view, but it is still unclear to me how to draw graphic content 
> in these layers.

I would start by drawing something to a single layer. You can draw using 
CALayer or CAOpenGLLayer. Use one of Apple’s sample code projects to get 
yourself up and running.

When using CALayer, subclass and override drawInContext: to draw something.

When using CAOpenGLLayer it is more difficult but basically you subclass and 
override drawInCGLContext:pixelFormat:forLayerTime:displayTime: to draw 
something.

For a “drawing application” you would most likely have a multitude of model 
objects drawn using a single layer.

Richard Charles
_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to