Revision: 5897
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5897&view=rev
Author: efiring
Date: 2008-07-27 00:58:51 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
Add contains method to QuiverKey
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/quiver.py
Modified: trunk/matplotlib/lib/matplotlib/quiver.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/quiver.py 2008-07-27 00:07:33 UTC (rev
5896)
+++ trunk/matplotlib/lib/matplotlib/quiver.py 2008-07-27 00:58:51 UTC (rev
5897)
@@ -293,12 +293,22 @@
self.set_transform(self.Q.ax.figure.dpi_scale_trans)
else:
raise ValueError('unrecognized coordinates')
- quiverkey_doc = _quiverkey_doc
def set_figure(self, fig):
martist.Artist.set_figure(self, fig)
self.text.set_figure(fig)
+ def contains(self, mouseevent):
+ # Maybe the dictionary should allow one to
+ # distinguish between a text hit and a vector hit.
+ if (self.text.contains(mouseevent)[0]
+ or self.vector.contains(mouseevent)[0]):
+ return True, {}
+ return False, {}
+
+ quiverkey_doc = _quiverkey_doc
+
+
class Quiver(collections.PolyCollection):
"""
Specialized PolyCollection for arrows.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins