Revision: 6366
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6366&view=rev
Author:   ryanmay
Date:     2008-11-05 17:09:55 +0000 (Wed, 05 Nov 2008)

Log Message:
-----------
Re-add the xy attribute to the Rectangle class (disappeared during the 
transforms refactor).

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/patches.py

Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py  2008-11-05 15:15:28 UTC (rev 
6365)
+++ trunk/matplotlib/lib/matplotlib/patches.py  2008-11-05 17:09:55 UTC (rev 
6366)
@@ -478,6 +478,10 @@
         "Return the bottom coord of the rectangle"
         return self._y
 
+    def get_xy(self):
+        "Return the left and bottom coords of the rectangle"
+        return self._x, self._y
+
     def get_width(self):
         "Return the width of the  rectangle"
         return self._width
@@ -502,6 +506,14 @@
         """
         self._y = y
 
+    def set_xy(self, xy):
+        """
+        Set the left and bottom coords of the rectangle
+
+        ACCEPTS: 2-item sequence
+        """
+        self._x, self._y = xy
+
     def set_width(self, w):
         """
         Set the width rectangle
@@ -536,6 +548,8 @@
     def get_bbox(self):
         return transforms.Bbox.from_bounds(self._x, self._y, self._width, 
self._height)
 
+    xy = property(get_xy, set_xy)
+
 class RegularPolygon(Patch):
     """
     A regular polygon patch.


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

Reply via email to