Author: hdu Date: Mon Jun 2 11:47:23 2014 New Revision: 1599173 URL: http://svn.apache.org/r1599173 Log: #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 little. Y-pos and height have the same problems and get the matching fix. Modified: openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx Modified: openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx?rev=1599173&r1=1599172&r2=1599173&view=diff ============================================================================== --- openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx (original) +++ openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx Mon Jun 2 11:47:23 2014 @@ -245,8 +245,8 @@ void AquaSalGraphics::RefreshRect(float // 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 ); } }