• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CALayer resizing puzzle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: CALayer resizing puzzle
      • From: David Duncan <email@hidden>
References: 
 >CALayer resizing puzzle (From: vincent habchi <email@hidden>)
 >Re: CALayer resizing puzzle (From: Scott Anguish <email@hidden>)
 >Re: CALayer resizing puzzle (From: Scott Anguish <email@hidden>)
 >Re: CALayer resizing puzzle (From: vincent habchi <email@hidden>)
 >Re: CALayer resizing puzzle (From: David Duncan <email@hidden>)

  • Prev by Date: patching the responder chain: puzzled by the docs
  • Next by Date: Re: CALayer resizing puzzle
  • Previous by thread: Re: CALayer resizing puzzle
  • Next by thread: Re: CALayer resizing puzzle
  • Index(es):
    • Date
    • Thread