Re: CALayer resizing puzzle
Re: CALayer resizing puzzle
- Subject: Re: CALayer resizing puzzle
- From: vincent habchi <email@hidden>
- Date: Fri, 22 Jan 2010 19:18:48 +0100
David,
> Yes it is. The contents property is generally used to represent bitmapped content of a layer, which in the case of a plain CALayer means that anything drawn via -drawInContext: or -drawLayer:inContext: will be accessible via the contents property.
Thanks for that answer. I would dare a further request for enlightenment ;) Does it mean that:
1. by defining a suitable ContentsRect, I can get a clipped area of a CALayer just by accessing layer.contents?
2. that I can copy this clipped area into an area the same size on another layer defined by another ContentsRect?
More specifically, if I do that:
layer1.contentsRect = CGRectMake(100, 100, 50, 50);
layer2.contentsRect = CGRectMake(0, 0, 50, 50);
layer2.contents = layer1.contents;
does it copy the bitmap contained in layer1 rectangle (100, 100, 50, 50) into layer2 rectangle (0, 0, 50, 50)?
Thanks ans cheers from Paris,
Vincent_______________________________________________
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