From 4e8aa7c5441e7b70b8beb519298dba7ed5f44dd4 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 4 Nov 2011 11:04:30 +1100 Subject: Round to nearest pixels horizontally to avoid background artifacts on OS X. From Mitchell Foral. --- gtk/PlatGTK.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index db28cae8b..e56847483 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -665,6 +665,8 @@ void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) { PenColour(back); if (context && (rc.left < maxCoordinate)) { // Protect against out of range + rc.left = lround(rc.left); + rc.right = lround(rc.right); cairo_rectangle(context, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); cairo_fill(context); -- cgit v1.2.3