Kaydet (Commit) ee9dd6c0 authored tarafından Herbert Dürr's avatar Herbert Dürr Kaydeden (comit) Caolán McNamara

#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 073ec69f)
üst 7b91c6aa
......@@ -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 );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment