Le 24 sept. 08 à 06:04, Alex Reynolds a écrit :

Is it possible to take a CGLayer and turn it into a bitmap representation?

Create a CGBitmapContext and draw you layer into it.


Also, is it possible to grab a CGRect "subset" of a CGLayer and append that to a new CGLayer, so that it isn't necessary to recalculate the entirety of a new CGLayer?


CGContextRef ctxt = CGLayerGetContext(mySecondLayer);
CGContextClipToRect(ctxt, …)
CGContextDrawLayerInRect(ctxt, myFirstLayer, …);

Thanks,
Alex


_______________________________________________

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

This email sent to [EMAIL PROTECTED]

Reply via email to