• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Need more NSLeftMouseDragged events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Need more NSLeftMouseDragged events
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: How to completely release every object allocated when opening a NIB file ?
  • Next by Date: Re: How to completely release every object allocated when opening a NIB file ?
  • Previous by thread: Re: How to completely release every object allocated when opening a NIB file ?
  • Next by thread: Re: Need more NSLeftMouseDragged events
  • Index(es):
    • Date
    • Thread