Relation Between a View's Bounds and its CTM
Relation Between a View's Bounds and its CTM
- Subject: Relation Between a View's Bounds and its CTM
- From: Gordon Apple <email@hidden>
- Date: Fri, 11 Dec 2009 13:22:37 -0600
- Thread-topic: Relation Between a View's Bounds and its CTM
Are there any good way to get/set a view's transform? (No, not using
CALayers.) It is possible to flip a view's horizontal and/or vertical
orientation by setting negative values for the bounds size. However, a
request for the view's bounds always returns a validated rect, giving no
indication of its flipped state. It's also not clear how this all relates
to a containing scrollView and how to keep them in sync. This gets
especially tricky with an NSTextView. Display is no problem and can be
handled in drawRect. However, for editing, the view's coordinate transform
need to be set correctly for mouse actions, especially in an NSTextView,
because it tracks internally and there's no way to intercept the events.
What exactly happens to the CTM when you set bounds, boundsOrigin,
boundsSize? Setting boundsSize with positive values does not affect the
flippedness. Setting a negative size value does flip it (which ever sign it
is). The magnitude looks like a replacement, but the sign looks like a
concatenation. So what's it really doing?
_______________________________________________
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