Revision: 7069 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7069&view=rev Author: mdboom Date: 2009年04月29日 15:28:33 +0000 (2009年4月29日) Log Message: ----------- Fix bug in Cairo backend due to changes in convert_path, reported by Michiel de Hoon 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 2009年04月28日 19:48:18 UTC (rev 7068) +++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2009年04月29日 15:28:33 UTC (rev 7069) @@ -122,8 +122,7 @@ tpath, affine = clippath.get_transformed_path_and_affine() ctx.new_path() affine = affine + Affine2D().scale(1.0, -1.0).translate(0.0, self.height) - tpath = affine.transform_path(tpath) - RendererCairo.convert_path(ctx, tpath) + RendererCairo.convert_path(ctx, tpath, affine) ctx.clip() def _fill_and_stroke (self, ctx, fill_c, alpha): @@ -184,9 +183,8 @@ ctx = self.ctx ctx.save() if clippath is not None: - tpath = clippath_trans.transform_path(clippath) ctx.new_path() - RendererCairo.convert_path(ctx, tpath) + RendererCairo.convert_path(ctx, clippath, clippath_trans) ctx.clip() y = self.height - y - rows ctx.set_source_surface (surface, x, y) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8142 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8142&view=rev Author: mdehoon Date: 2010年02月22日 09:43:19 +0000 (2010年2月22日) Log Message: ----------- Removing the check for path length; this seems not needed with recent versions of cairo/pycairo. 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月18日 14:54:30 UTC (rev 8141) +++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2010年02月22日 09:43:19 UTC (rev 8142) @@ -138,9 +138,6 @@ 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 + \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8162 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8162&view=rev Author: mdehoon Date: 2010年02月27日 17:00:53 +0000 (2010年2月27日) 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.
Revision: 8384 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8384&view=rev Author: leejjoon Date: 2010年06月05日 18:32:06 +0000 (2010年6月05日) Log Message: ----------- RendererCairo.__init__ calls RendererBase.__init__ 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年06月05日 18:32:00 UTC (rev 8383) +++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2010年06月05日 18:32:06 UTC (rev 8384) @@ -96,6 +96,8 @@ cairo.ImageSurface (cairo.FORMAT_ARGB32,1,1)) self.mathtext_parser = MathTextParser('Cairo') + RendererBase.__init__(self) + def set_ctx_from_surface (self, surface): self.gc.ctx = cairo.Context (surface) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8412 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8412&view=rev Author: efiring Date: 2010年06月11日 08:09:25 +0000 (2010年6月11日) Log Message: ----------- [3014606] fix set_alpha in backend_cairo 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年06月11日 07:23:54 UTC (rev 8411) +++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2010年06月11日 08:09:25 UTC (rev 8412) @@ -140,8 +140,8 @@ 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.") + if len(path.vertices) > 18980: + raise ValueError("The Cairo backend can not draw paths longer than 18980 points.") ctx = gc.ctx @@ -315,9 +315,10 @@ def set_alpha(self, alpha): - self._alpha = alpha + GraphicsContextBase.set_alpha(self, alpha) + _alpha = self.get_alpha() rgb = self._rgb - self.ctx.set_source_rgba (rgb[0], rgb[1], rgb[2], alpha) + self.ctx.set_source_rgba (rgb[0], rgb[1], rgb[2], _alpha) #def set_antialiased(self, b): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.