Hi,

I'm working on an iOS app which needs to draw paths. Drawing is performed in 
layers, each layer having its own color. Some paths add (opaque) content, while 
some paths remove content (i.e. draw in a clear color). Content removal should 
only happen on a per layer basis. This model fits exactly with CALayer, with a 
CALayer for each drawing layer.
The drawing layers can contain up to 30000 paths.
Since I want to be able to zoom in, I'm using CATiledLayer. Unfortunately 
CATiledLayer does not allow sub layers.
Now I can create a container layer which contains all the drawing layers as 
sublayers and call [containerLayer renderInContext:], to render it to the 
CATiledLayer, but it will render the complete layer for each and every tile. So 
performance drops considerably. I also noticed that this route only works with 
CAShapeLayers for each path. A custom drawInContext: does not get invoked.
If I render all paths directly to the CATiledLayer and check the bounding boxes 
against the clipbox I get reasonable performance, but paths drawn in clear 
color will remove all content below them, not only content from the same 
drawing layer.
Is there some way to render a container layer to a CATiledLayer while keeping 
any knowledge about the clipping path (i.e. skipping over any paths which are 
outside the clip bounds)?

Thanks in advance.

Kind regards,

Remco Poelstra


_______________________________________________

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