• 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: Affine transform not being applied to subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Affine transform not being applied to subviews


  • Subject: Re: Affine transform not being applied to subviews
  • From: Kyle Sluder <email@hidden>
  • Date: Thu, 21 May 2009 22:59:32 -0400

On Thu, May 21, 2009 at 10:52 PM, Ken Tozier <email@hidden> wrote:
> Perhaps I'm not understanding how transforms are supposed to work, but from
> my reading of the relevant drawing and transform documentation, I got the
> impression that if a transform was applied to a view, it treated the view
> and all it's subviews as a single unit. Is that not the case?

There's no reason to assume that a superview's -drawRect will be
called before a subview's -drawRect, and even if there were there's no
guarantee that the framework doesn't call -[NSGraphicsContext
saveGraphicsState] before and -[NSGraphicsContext
restoreGraphicsState] afterwards.  This is especially true when AppKit
optimizes away a superview draw when a subview that returns YES from
-isOpaque completely obscures the superview.

If you want to apply scaling to your subviews, you need to use the
frame and bounds rectangles appropriately or communicate your
transformation matrices to your subviews as you are currently doing.

--Kyle Sluder
_______________________________________________

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: 
 >Affine transform not being applied to subviews (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Affine transform not being applied to subviews
  • Next by Date: Ask for NSTextField
  • Previous by thread: Re: Affine transform not being applied to subviews
  • Next by thread: Ask for NSTextField
  • Index(es):
    • Date
    • Thread