Skip to content

Agg snapping fixes (for the last time...?) :) #1800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 7, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions lib/matplotlib/backends/backend_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def draw_mathtext(self, gc, x, y, s, prop, angle):
ox, oy, width, height, descent, font_image, used_characters = \
self.mathtext_parser.parse(s, self.dpi, prop)

x = int(x) + ox
y = int(y) - oy
x = np.round(x + ox)
y = np.round(y - oy)
self._renderer.draw_text_image(font_image, x, y + 1, angle, gc)

def draw_text(self, gc, x, y, s, prop, angle, ismath):
Expand All @@ -179,7 +179,8 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath):
font.draw_glyphs_to_bitmap(antialiased=rcParams['text.antialiased'])

#print x, y, int(x), int(y), s
self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1, angle, gc)
self._renderer.draw_text_image(
font.get_image(), np.round(x), np.round(y) + 1, angle, gc)

def get_text_width_height_descent(self, s, prop, ismath):
"""
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/arc_ellipse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/axhspan_epoch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/axvspan_epoch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/boxplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/canonical.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/const_xy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/errorbar_zorder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/fill_units.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hexbin_extent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hexbin_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist2d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist_log.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist_offset.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist_steplog.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/imshow.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/imshow_clip.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/log_scales.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/marker_edges.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/markevery.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/markevery_line.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/offset_points.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/pcolormesh.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/polar_axes.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/polar_coords.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/polar_rmin.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/polar_units.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/polar_units_2.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/polar_wrap_180.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/polar_wrap_360.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/scatter.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/shaped_data.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/single_date.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/single_point.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/symlog.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/symlog2.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/units_strings.png
Binary file modified lib/matplotlib/tests/baseline_images/test_dates/date_axhline.png
Binary file modified lib/matplotlib/tests/baseline_images/test_dates/date_axhspan.png
Binary file modified lib/matplotlib/tests/baseline_images/test_dates/date_axvline.png
Binary file modified lib/matplotlib/tests/baseline_images/test_dates/date_axvspan.png
Binary file modified lib/matplotlib/tests/baseline_images/test_dates/date_empty.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/cliff-nn-con.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/cliff-nn-img.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/gauss-nn-con.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/steep-nn-con.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/trig-lin-con.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/trig-lin-img.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/trig-nn-con.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/trig-nn-img.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/trig-ref-con.png
Binary file modified lib/matplotlib/tests/baseline_images/test_delaunay/trig-ref-img.png
Binary file modified lib/matplotlib/tests/baseline_images/test_figure/figure_today.png
Binary file modified lib/matplotlib/tests/baseline_images/test_image/image_clip.png
Binary file modified lib/matplotlib/tests/baseline_images/test_image/image_interps.png
Binary file modified lib/matplotlib/tests/baseline_images/test_image/imshow.png
Binary file modified lib/matplotlib/tests/baseline_images/test_legend/fancy.png
Binary file modified lib/matplotlib/tests/baseline_images/test_legend/legend_auto1.png
Loading