Revision: 8162
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8162&view=rev
Author:   mdehoon
Date:     2010-02-27 17:00:53 +0000 (Sat, 27 Feb 2010)

Log Message:
-----------
With cairo /pycairo both at version 1.8.8, I'm still seeing crashes with paths
longer than 20000 points or so (tried the gtkcairo backend on Mac OS X). So the
path length check is still needed.

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py   2010-02-26 
16:27:55 UTC (rev 8161)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py   2010-02-27 
17:00:53 UTC (rev 8162)
@@ -138,6 +138,9 @@
 
 
     def draw_path(self, gc, path, transform, rgbFace=None):
+        if len(path.vertices) > 18980:          
+            raise ValueError("The Cairo backend can not draw paths longer than 
18980 points.")          
+
         ctx = gc.ctx
 
         transform = transform + \
@@ -145,7 +148,7 @@
 
         ctx.new_path()
         self.convert_path(ctx, path, transform)
-
+               
         self._fill_and_stroke(ctx, rgbFace, gc.get_alpha())
 
     def draw_image(self, gc, x, y, im):


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to