On Dec 10, 2013, at 1:32 AM, Graham Cox <graham....@bigpond.com> wrote:

>> Which is another reason to seriously consider CATiledLayer
> 
> I”ll consider it, and revisit it…
> 
> But my situation is that I need to draw VECTOR objects up to 25,000% zoom 
> with no pixelization.

You're given a CGContext to draw into; What's the difference? The tiled drawing 
is async, so if the drawing doesn't occur fast enough it'll scale up the 
low-scale bitmap, but what's evil about that? It's like Apple or Google maps. 



> The other problem is that CA.. anything must live in a view. My vector data 
> model doesn’t really care about views. The same model can be rendered into 
> multiple views if you want.

Ok, two things:

1) I don't think anyone (so far) suggesting that you use CATiledLayer was also 
suggesting you switch *everything* over to layers. Just use a single (tiling) 
layer and draw into the CGContext you're handed. CATiledLayer simply does what 
you're trying to do: section the visible area into tiles and draw them in 
parallel. The idea is that by using it you push drawing commands into the ether 
which may end up being drawn on the GPU via QE (I don't know that anyone said 
that, but it's something that occurred to me, I'm just not sure on how that's 
done internally), but more directly, by using CATiledLayer you don't have to 
handle the tiling and threading yourself, and it avoids the final blit of your 
buffer into the view because you're (presumably) drawing directly into the 
layer backing.

2) Even if you *were* going to make everything a layer, you don't need to 
intermingle your models and layers in the same hierarchy. The layers can become 
their own hierarchy and you can traverse, inspect, and manipulate them in the 
same way you would your model hierarchy (with the addition of some helpful 
methods of your own). You can also add any arbitrary k/v pairs to a layer, 
which gives you convenient property/reference storage. It's certainly not 
trivial, but when you get it all setup it's not bad.



--
Seth Willits




_______________________________________________

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