aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-11-04 11:04:30 +1100
committernyamatongwe <devnull@localhost>2011-11-04 11:04:30 +1100
commit4e8aa7c5441e7b70b8beb519298dba7ed5f44dd4 (patch)
treed47c2486465513f14ef65d53a6a9ea5ffab8dcca
parente8bba407198738106cfe62ff8782e895a2993b97 (diff)
downloadscintilla-mirror-4e8aa7c5441e7b70b8beb519298dba7ed5f44dd4.tar.gz
Round to nearest pixels horizontally to avoid background artifacts on OS X.
From Mitchell Foral.
-rw-r--r--gtk/PlatGTK.cxx2
1 files changed, 2 insertions, 0 deletions
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);