From: <md...@us...> - 2009-08-31 15:31:54
|
Revision: 7614 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7614&view=rev Author: mdboom Date: 2009-08-31 15:31:46 +0000 (Mon, 31 Aug 2009) Log Message: ----------- [2832896] raster scale error in PDF, EPS output Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py trunk/matplotlib/lib/matplotlib/image.py trunk/matplotlib/src/_backend_agg.cpp Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2009-08-31 05:23:37 UTC (rev 7613) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2009-08-31 15:31:46 UTC (rev 7614) @@ -140,7 +140,7 @@ # space) in the following call to draw_text_image). font.set_text(s, 0, flags=LOAD_FORCE_AUTOHINT) font.draw_glyphs_to_bitmap() - + #print x, y, int(x), int(y), s self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1, angle, gc) Modified: trunk/matplotlib/lib/matplotlib/image.py =================================================================== --- trunk/matplotlib/lib/matplotlib/image.py 2009-08-31 05:23:37 UTC (rev 7613) +++ trunk/matplotlib/lib/matplotlib/image.py 2009-08-31 15:31:46 UTC (rev 7614) @@ -141,7 +141,7 @@ gc = renderer.new_gc() gc.set_clip_rectangle(self.axes.bbox.frozen()) gc.set_clip_path(self.get_clip_path()) - renderer.draw_image(gc, round(l), round(b), im) + renderer.draw_image(gc, l, b, im) def contains(self, mouseevent): """ @@ -421,10 +421,8 @@ ty = (ymin-self.axes.viewLim.y0)/dyintv * numrows l, b, r, t = self.axes.bbox.extents - widthDisplay = (round(r) + 0.5) - (round(l) - 0.5) - heightDisplay = (round(t) + 0.5) - (round(b) - 0.5) - widthDisplay *= magnification - heightDisplay *= magnification + widthDisplay = (round(r*magnification) + 0.5) - (round(l*magnification) - 0.5) + heightDisplay = (round(t*magnification) + 0.5) - (round(b*magnification) - 0.5) im.apply_translation(tx, ty) # resize viewport to display Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2009-08-31 05:23:37 UTC (rev 7613) +++ trunk/matplotlib/src/_backend_agg.cpp 2009-08-31 15:31:46 UTC (rev 7614) @@ -803,8 +803,8 @@ args.verify_length(4); GCAgg gc(args[0], dpi); - double x = Py::Float(args[1]); - double y = Py::Float(args[2]); + double x = mpl_round(Py::Float(args[1])); + double y = mpl_round(Py::Float(args[2])); Image *image = static_cast<Image*>(args[3].ptr()); bool has_clippath = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |