> On 17 Sep 2019, at 09:04, Gabriel Zachmann via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
>> 
>> The bounds origin is the origin of the coordinate system for sublayers of 
>> that layer, and thus changing the bounds origin moves sublayers around.
> 
> Thanks a lot for the insight.
> 
> Just out of curiosity (or for fellow developers):
> I have just read up about the bounds property in the NSView documentation.
> It says there that bounds defines the view's rectangle "in its own coordinate 
> system".
> If that were the case, then ‒ by definition! - the origin of bounds is always 
> 0,0,
> and it does not make any mathematical sense to set it to any other value.
> In fact, it does not even make sense to expose the origin as a value.

Not true :-)

Imagine your view is a window through which you can see a piece of graph paper. 
Normally, the graph paper is placed so that 0,0 on it is in the corner of the 
view, but it doesn’t have to be. Sometimes it might be useful to move that 
piece of paper (and thus everything else on it) around inside the “window”.

This is has scrolling tends to be implemented for example.

Mike.

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to