On Oct 2, 2010, at 10:05 AM, Ken Tozier <kentoz...@comcast.net> wrote:
> > I decided to simplify and created a project just for exploring transforms. > Long story short, I still find them extremely counter intuitive. After > futzing with transforms for a few hours, I decided to try a different tack. > TI ended up writing a base class (see below) for all my apps views which does > exactly what I want re scaling "page" views. When I call the "setScale" > method, it scales both the origin and size of a view and calls [self > setFrame] which propagates "setScale" to all the subviews. How would I get > the same sort of behavior using transforms? You don't. As Matt explained, transforms are applied to the current graphics context state. Before calling -drawRect:, AppKit pushes a new graphics state on the stack, and pops it when your -drawRect: returns. It sounds like you want to scale your bounds coordinate system instead. In fact, the entire trick to bounds coordinate systems is that AppKit applies a transform representing all the accumulated bounds coordinate system scales before it calls your -drawRect:. Hopefully this whole thing makes more sense to you now. --Kyle Sluder_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com