|
From: <lee...@us...> - 2010-12-29 03:01:16
|
Revision: 8849
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8849&view=rev
Author: leejjoon
Date: 2010-12-29 03:01:10 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
make RendererAgg.draw_path_collection as a wrapper function
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2010-12-29 03:00:36 UTC (rev 8848)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2010-12-29 03:01:10 UTC (rev 8849)
@@ -75,15 +75,18 @@
else:
return LOAD_NO_HINTING
+ # for filtering to work with rasterization, methods needs to be wrapped.
+ # maybe there is better way to do it.
def draw_markers(self, *kl, **kw):
- # for filtering to work with rastrization, methods needs to be wrapped.
- # maybe there is better way to do it.
return self._renderer.draw_markers(*kl, **kw)
+ def draw_path_collection(self, *kl, **kw):
+ return self._renderer.draw_path_collection(*kl, **kw)
+
def _update_methods(self):
#self.draw_path = self._renderer.draw_path # see below
#self.draw_markers = self._renderer.draw_markers
- self.draw_path_collection = self._renderer.draw_path_collection
+ #self.draw_path_collection = self._renderer.draw_path_collection
self.draw_quad_mesh = self._renderer.draw_quad_mesh
self.draw_gouraud_triangle = self._renderer.draw_gouraud_triangle
self.draw_gouraud_triangles = self._renderer.draw_gouraud_triangles
@@ -326,6 +329,10 @@
post_processing is plotted (using draw_image) on it.
"""
+ # WARNING.
+ # For agg_filter to work, the rendere's method need
+ # to overridden in the class. See draw_markers, and draw_path_collections
+
from matplotlib._image import fromarray
width, height = int(self.width), int(self.height)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|