Re: Using CALayer's renderInContext: method with geometryFlipped
Re: Using CALayer's renderInContext: method with geometryFlipped
- Subject: Re: Using CALayer's renderInContext: method with geometryFlipped
- From: Graham Cox <email@hidden>
- Date: Sun, 23 Oct 2011 10:19:36 +1100
On 22/10/2011, at 9:09 PM, Nial Giacomelli wrote:
> The PNG file that is ultimately generated renders the content
> correctly, but doesn't seem to takes the flipped geometry into account. I'm
> obviously looking for test.png to accurately represent the content shown to
> the left.
When -renderInContext: is invoked, the CALayer captures that content as an image and when it's displayed by the OpenGL system the geometry is applied. So none of the geometric properties, transforms, etc apply at that time - they are applied to display that content, not to generate it.
I think you may have the idea of -renderInContext: backwards - it's not invoked when the layer is drawn on screen, but to supply some content for the layer which is drawn later, with transformations.
I think you'll have to grab all the properties you want to apply and take them into account when generating your png image.
--Graham_______________________________________________
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