• 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
Seriously confused by behavior of NSAffineTransform
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Seriously confused by behavior of NSAffineTransform


  • Subject: Seriously confused by behavior of NSAffineTransform
  • From: Ken Tozier <email@hidden>
  • Date: Sat, 2 Oct 2010 03:50:58 -0400

Hi

I'm trying to learn to use NSAffineTransforms and am finding their behavior so bizarre that they are all but useless. I've read the Cocoa drawing docs related to transforms, multiple times, and pored over the NSAffineTransform class docs for hours. I just don't understand why it's doing such completely unexpected things.

Basically, I have a view into which I place a bunch of "page" subviews. The goal is to be able to resize the pages much like iPhoto does with thumbnails, by treating each page as a single object and scaling that. The docs state "Scaling does not change the origin of the coordinate system" but that definitely is not what I'm seeing. As soon as I resize the view by so much as a single pixel, all the page views vanish. So my questions are:

1. If I apply a scaling transform to a page view containing stuff like text, photos, etc..., should the transform treat the page view as a single unit? Currently, I'm having to apply the transform not only to the page, but to each item it contains. In other words, the content does not scale with the view that contains it.
2. Since the only transform I'm applying is to scale a view, how come everything vanishes on resize? Does this vanishing behavior spark any insights from any transform experts?
3. Since my scaling transforms are moving the page views way out of the containing view frame, are there any tricks to find out exactly where the scaled view is being drawn? Testing the origin after the transform just tells me it is at the untransformed origin, which clearly it is not.

Thanks for any help_______________________________________________

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

  • Prev by Date: Re: Coverflow API in Mac OS 10.6
  • Next by Date: Re: info.plist with DYLD_LIBRARY_PATH = ~/test
  • Previous by thread: NSWindow orderFront
  • Next by thread: Re: Seriously confused by behavior of NSAffineTransform
  • Index(es):
    • Date
    • Thread