Need more NSLeftMouseDragged events
Need more NSLeftMouseDragged events
- Subject: Need more NSLeftMouseDragged events
- From: Sailor Quasar <email@hidden>
- Date: Mon, 12 Jan 2004 05:06:47 -0500
I'm implementing a "pencil" tool for a painting surface using a
subclass of NSQuickDrawView. I respond to NSLeftMouseDragged by setting
a pixel for the current event, which is the simple way. Unfortunately,
this tends to result in a bunch of single pixels on my surface, rather
than a connected series, since the faster the mouse moves, the less
drag events I get per area of screen. This is only to be expected,
since 90% of applications would rather have the efficiency of a less
crowded event stream than pixel-by-pixel precision in a drag. However,
my implementation needs either the full stream, or some intelligent way
to interpolate between dragging events. Does anyone have any ideas on
how to deal with this? The only thought I've had so far is the modal
mouse tracking event loop shown in the docs for NSView, but I think
this is a matter of just processing the event more often, rather than
getting it for every pixel. Should I be tracking the mouse some other
way, maybe?
-- Sailor Quasar, High Codemaster of the Web, scourge of systems
MacOS is to Windows as Terminus is to Trantor.
Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.