Re: Printing layer-based view
Re: Printing layer-based view
- Subject: Re: Printing layer-based view
- From: David Duncan <email@hidden>
- Date: Tue, 08 Jan 2013 15:55:37 -0800
On Jan 8, 2013, at 3:34 PM, Graham Cox <email@hidden> wrote:
> On 09/01/2013, at 2:20 AM, Kyle Sluder <email@hidden> wrote:
>
>> That'll generate huge 72dpi bitmaps rather than a vector representation.
>
> But it doesn't....
>
> The layers that are CAShapeLayers render as vectors, and no amount of zooming in Preview shows any pixelation. Other layers, such as CATextLayer, do pixelate, which is why I was asking about a vector solution for these.
>
> One drawback I have found is that if the view is zoomed the print operation paginates the zoomed area, which can generate hundreds of pages - this will need to be temporarily set back to 100% during printing, but that is a relatively minor issue.
The practical reality of -renderInContext: is that its unlikely to do exactly what you want. Its really only useful for capturing content that you plan to immediately redisplay on screen (and even then it doesn't capture the entire core animation model, so some things won't work at all).
On the desktop the most complete rendering you can do is via the CARenderer, but especially if you have animations you want to capture it can be fairly complex to get right. Also you'll have to implement tiling yourself and your basically doing raster rendering (since its via OpenGL). Overall not the greatest experience.
As Kyle mentioned, doing this yourself, rather than relying upon CA, is probably for the best at this time.
--
David Duncan
_______________________________________________
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