• 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
Coordinate conversions in CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coordinate conversions in CALayer


  • Subject: Coordinate conversions in CALayer
  • From: Graham Cox <email@hidden>
  • Date: Tue, 22 Jan 2013 09:12:51 +1100

Hi all,

Recently I built an (experimental) app around CALayer and friends which implements a vector schematic editor.

I found that CALayer isn't, not too surprisingly, really a good base for vector graphics - CAShapeLayer is nice enough but there's nothing for text and I rapidly ran into problems when trying to zoom into my view when layer objects became too large and started hitting OpenGL limits. I also found that supporting printing and capture to PDF needs a fair bit of work. The ability to perform easy animations is nice but not really important for the application here.

So I'm looking into implementing a CALayer-like architecture but which just draws using Core Graphics functions in the normal manner. Fairly straightforward but I'm having a bit of difficulty with methods such as -convertRect:toLayer:

My question is, is there a way to directly convert coordinates between two unrelated layers in a tree, or are these methods implemented by recursion up to a common parent node and then back down to the target layer? If I had some hint of how this was done in the real CALayer architecture it would help me avoid wasting time trying various blind alleys.

--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

  • Follow-Ups:
    • Re: Coordinate conversions in CALayer
      • From: Andy Lee <email@hidden>
  • Prev by Date: Re: How to avoid warning?
  • Next by Date: Re: Coordinate conversions in CALayer
  • Previous by thread: Re: How can I get rid of this warning message?
  • Next by thread: Re: Coordinate conversions in CALayer
  • Index(es):
    • Date
    • Thread