summaryrefslogtreecommitdiff
path: root/vcl/quartz/salgdiutils.cxx
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2014-06-02 11:47:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-06-03 09:15:13 +0100
commitee9dd6c086f7bda615d5b28d3319a83ce1673607 (patch)
tree37a0f2d3d1180725bbcbea82d6b729a00682aa23 /vcl/quartz/salgdiutils.cxx
parent7b91c6aaf9e0ef09ba31dee564dcee4def545549 (diff)
#i125020# fix rounding error in AquaSalGraphics::RefreshRect()
Rounding left and width down can accumulate a rounding error of almost two in the calculation of right. The existing code compensates for this by increasing the width by two, but since left has been decremented by one to accommodate for antialiasing artifacts this compensation is one to few by itself and two to few when accounting for antialiasing artifacts on the right. Y-pos and height have the same problems and get the matching fix. (cherry picked from commit 073ec69fb970830d39c8700317ee74dbbdfd1fda)
Diffstat (limited to 'vcl/quartz/salgdiutils.cxx')
-rw-r--r--vcl/quartz/salgdiutils.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index c25120319b74..639398fd6ef4 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -184,8 +184,8 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh
// this helps with antialiased rendering
const Rectangle aVclRect(Point(static_cast<long int>(lX-1),
static_cast<long int>(lY-1) ),
- Size( static_cast<long int>(lWidth+2),
- static_cast<long int>(lHeight+2) ) );
+ Size( static_cast<long int>(lWidth+3),
+ static_cast<long int>(lHeight+3) ) );
mpFrame->maInvalidRect.Union( aVclRect );
}
}