Hello,
On 28.11.11 15:40, Richard Somers wrote:
>> However, the mouseDown and mouseUp events always produce truncated
coordinates.
>> e.g. x:140.000000 y:128.000000
>>
>> This causes inaccuracy with hit testing between mouseMoved and
mouseDown.
>
> Using floor, ceil, or round on the returned value does not work
because the value can be off by as much as +-1.0.
Little late into this but I'm curious, did you manage to come up with a
solution for the issue (I just ran into the same issue)?
As an illustration for the list, I have logged coordinates of a mouse
move and a subsequent mouse down event that followed the move event:
mouseMovedToPoint:NSPoint: {217.15625, 343.3984375}
mouseDownAtPoint:NSPoint: {217, 344}
So it can happen that the hit-tests in -mouseMoved: and -mouseDown:
return different objects in my view's object tree (which happens
surprisingly often, btw.).
Anyone know how the system works out the integral coordinates?
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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