From 264d06fe073c00af5129afcd5ab99c8c712bcfe8 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 12 Dec 2012 09:38:49 -0500 Subject: [PATCH] Fix for Agg clipping box --- src/_backend_agg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_backend_agg.cpp b/src/_backend_agg.cpp index 6116dd7eeb66..aa06594048d8 100644 --- a/src/_backend_agg.cpp +++ b/src/_backend_agg.cpp @@ -442,9 +442,9 @@ RendererAgg::set_clipbox(const Py::Object& cliprect, R& rasterizer) if (py_convert_bbox(cliprect.ptr(), l, b, r, t)) { rasterizer.clip_box(std::max(int(floor(l - 0.5)), 0), - std::max(int(floor(height - b - 0.5)), 0), - std::min(int(floor(r - 0.5)), int(width)), - std::min(int(floor(height - t - 0.5)), int(height))); + std::max(int(height - floor(b - 0.5)), 0), + std::min(int(ceil(r + 0.5)), int(width)), + std::min(int(height - ceil(t + 0.5)), int(height))); } else {