FROM : Quincey Morris
DATE : Wed Mar 12 22:05:50 2008
On Mar 12, 2008, at 13:13, Jens Alfke wrote:
> On 12 Mar '08, at 12:13 PM, Nathan Vander Wilt wrote:
>
>> I want to be able to convert a mouse
>> coordinate into a point suitable for -hitTest:'ing on
>> my root layer. I can convert from the mouse
>> coordinates to the view's coordinates, but then I am
>> not sure how to proceed.
>
> There doesn't seem to be any API for converting between the
> coordinates of a view and its root layer. You could probably do it
> by getting the root layer's transform property, and then running the
> point in view coordinates through that.
Is this what the new NSView convertPointTo/FromBase: are for?
(Described in Leopard developer release notes.)
DATE : Wed Mar 12 22:05:50 2008
On Mar 12, 2008, at 13:13, Jens Alfke wrote:
> On 12 Mar '08, at 12:13 PM, Nathan Vander Wilt wrote:
>
>> I want to be able to convert a mouse
>> coordinate into a point suitable for -hitTest:'ing on
>> my root layer. I can convert from the mouse
>> coordinates to the view's coordinates, but then I am
>> not sure how to proceed.
>
> There doesn't seem to be any API for converting between the
> coordinates of a view and its root layer. You could probably do it
> by getting the root layer's transform property, and then running the
> point in view coordinates through that.
Is this what the new NSView convertPointTo/FromBase: are for?
(Described in Leopard developer release notes.)
| Related mails | Author | Date |
|---|---|---|
| Nathan Vander Wilt | Mar 12, 20:13 | |
| Jens Alfke | Mar 12, 21:13 | |
| Quincey Morris | Mar 12, 22:05 | |
| Nathan Vander Wilt | Mar 12, 22:49 | |
| Nathan Vander Wilt | Mar 12, 23:06 | |
| Jens Alfke | Mar 12, 23:26 | |
| Jens Alfke | Mar 12, 23:35 | |
| Quincey Morris | Mar 13, 00:05 | |
| Nathan Vander Wilt | Mar 13, 00:38 |






Cocoa mail archive

