• 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: CATiledLayer documentation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CATiledLayer documentation


  • Subject: Re: CATiledLayer documentation
  • From: David Duncan <email@hidden>
  • Date: Mon, 18 Aug 2008 12:08:55 -0700

On Aug 18, 2008, at 10:54 AM, Houdah - ML Pierre Bernard wrote:

Unfortunately, the sample code left me confused. Seems to me that your drawing method always does the same thing. I find no notion of tiling. Obviously there is: when I set a breakpoint on the drawing method I can clearly see the view being drawn bit by bit. I just don't understand how it works.

Actually, thats the intended model. When a tiled layer calls on its delegate's -drawLayer:inContext: (or its own -drawInContext:) method, the context has already been transformed and clipped to capture what is necessary for the tile that its drawing. This allows for a model where you don't have to be concerned with the tiling if you don't want to be.


If you do want to be concerned with the tiles, then you can use CGContextGetClipBoundingBox() to determine the tile that you are being asked to draw. If your using the level of detail as well, you can either use that same clip box (carefully) to deduce the scale, or use CGContextGetCTM() to get the current transform matrix and use that to deduce the scale (although this relies on certain assumptions about the CTM that will be applied).

Of course, I would have hoped for an example with multiple image source containing tiles.


Noted. :).
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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


References: 
 >CATiledLayer documentation (From: Houdah - ML Pierre Bernard <email@hidden>)
 >Re: CATiledLayer documentation (From: Bill Dudney <email@hidden>)
 >Re: CATiledLayer documentation (From: Houdah - ML Pierre Bernard <email@hidden>)

  • Prev by Date: Re: NSString Question
  • Next by Date: Re: ScriptingBrige InDesign
  • Previous by thread: Re: CATiledLayer documentation
  • Next by thread: Re: CATiledLayer documentation
  • Index(es):
    • Date
    • Thread