Revision: 7857
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7857&view=rev
Author: leejjoon
Date: 2009-10-07 16:03:23 +0000 (Wed, 07 Oct 2009)
Log Message:
-----------
patches.Arc.get_path returns the original arc path (instead of ellipse or
truncated arc)
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-10-07 16:03:08 UTC (rev
7856)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-10-07 16:03:23 UTC (rev
7857)
@@ -1219,6 +1219,9 @@
self.theta1 = theta1
self.theta2 = theta2
+ self._path = Path.arc(self.theta1, self.theta2)
+
+
@allow_rasterization
def draw(self, renderer):
"""
@@ -1278,7 +1281,7 @@
inv_error = (1.0 / 1.89818e-6) * 0.5
if width < inv_error and height < inv_error:
- self._path = Path.arc(self.theta1, self.theta2)
+ #self._path = Path.arc(self.theta1, self.theta2)
return Patch.draw(self, renderer)
def iter_circle_intersect_on_line(x0, y0, x1, y1):
@@ -1360,15 +1363,22 @@
last_theta = theta1
theta1_rad = theta1 * DEG2RAD
inside = box_path.contains_point((np.cos(theta1_rad),
np.sin(theta1_rad)))
+
+ # save original path
+ path_original = self._path
for theta in thetas:
if inside:
- self._path = Path.arc(last_theta, theta, 8)
+ _path = Path.arc(last_theta, theta, 8)
Patch.draw(self, renderer)
inside = False
else:
inside = True
last_theta = theta
+ # restore original path
+ self._path = path_original
+
+
def bbox_artist(artist, renderer, props=None, fill=True):
"""
This is a debug function to draw a rectangle around the bounding
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins