On Jul 29, 2014, at 22:38 , Graham Cox <[email protected]> wrote:
> Unfortunately I don't think this will work for me if I understand what you're > saying correctly, because my document content is in fact a drawing canvas > that has a fixed size (that the user can set) but this is independent of the > size and aspect ratio of the clip view. The canvas can be zoomed at will, and > will often become smaller than the entire clip view, at least in one or other > dimension (though both is common too). What I’m suggesting is that the document view and the canvas are not the same thing, and the canvas need not even be a view. The canvas bounds and the document view bounds are not the same thing, in general: — The document view bounds are forced to be at least as large as the clip bounds. — The document view bounds are forced to be at least as large as the canvas bounds, in the canvas’s current scale. Thus, if the canvas is smaller than the clip view (in either or both dimensions), it is simply drawn within the document view. This can be achieved either by making the canvas a subview of the document view, or by drawing in the document view itself but limiting the drawing to the bounds of the canvas, in the dimensions that the canvas is smaller. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
