• 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
Flipping coordinate system of a CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flipping coordinate system of a CALayer


  • Subject: Flipping coordinate system of a CALayer
  • From: Oleg Krupnov <email@hidden>
  • Date: Thu, 15 Jul 2010 19:18:42 +0300

Hi,

In a layer-hosting custom view, I'm flipping the root layer coordinate
system with the following code:

CGAffineTransform flipTransform;
flipTransform.a = 1.0;
flipTransform.b = 0.0;
flipTransform.c = 0.0;
flipTransform.d = -1.0;
flipTransform.tx = 0.0;
flipTransform.ty = 0.0;
[rootLayer setAffineTransform:flipTransform];

This code works fine and causes the layer and all its sublayers to
flip so that the origin is in the top left corner.


However, the problem is that when I place this custom view inside
another layer-backed view (or just check the "Wants Core Animation
Layer" box of the parent view in Interface builder), I observe that
the coordinate system of the layer is unflipped, like if the code
above did not have any effect.

Is this a bug? And how to work around it?

I could use the 10.6's geometryFlipped property, which is free of this
problem, but I'd still like to support 10.5.

Thanks!

Oleg.
_______________________________________________

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: Flipping coordinate system of a CALayer
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: NSTextView becomes temporarily unresponsive
  • Next by Date: Re: NSImage to IplImage (was: Adding an image to a project)
  • Previous by thread: NSURLCredential and UTF-8 username
  • Next by thread: Re: Flipping coordinate system of a CALayer
  • Index(es):
    • Date
    • Thread