Re: Cocoa-dev Digest, Vol 16, Issue 87
Re: Cocoa-dev Digest, Vol 16, Issue 87
- Subject: Re: Cocoa-dev Digest, Vol 16, Issue 87
- From: Mike Abdullah via Cocoa-dev <email@hidden>
- Date: Tue, 17 Sep 2019 09:06:56 +0100
> On 17 Sep 2019, at 09:04, Gabriel Zachmann via Cocoa-dev
> <email@hidden> 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 (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