On Sep 1, 2009, at 9:30 PM, Matthias Arndt <apple-...@arndt- family.com> wrote:

(1.) using "scaleUnitSquareToSize" of the clip view (leaving the coordination system of the custom view untouched) or

Where did you hear about this technique? I don't know if it's guaranteed to work. The next time the scroll view tiles or does some other thing it might be very confused.

For some reason Apple actively avoids describing the actual machinations of NSClipView. When I first encountered NSScrollView I was very confused. All the documentation said was that NSClipView set itself up in such a way that it displayed only a portion of its document view. Describing that configuration would probably do a lot to demystify the relationship between bounds and frame for a lott of newcomers.

(2.) changing the bounds / frame of the custom view and handling the scaling in the custom view's drawRect:

You shouldn't need to do anything special in drawRect. If you need to draw anything at the screen resolution, as opposed to scaled by the bounds transformation, then you'll want to avoid scaling altogether and have a custom zoom factor. Only then will drawRect need to handle scaling.

--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

Reply via email to