From b5440720ae1aba87fa07a0d21a7c6d44c2698713 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 20 Oct 2014 09:03:35 +0200 Subject: [PATCH] ScreenSaverSelector: fix drawing of "stop" icon * Use B_SUBPIXEL_PRECISE and remove incorrect rounding * Drawing the bar of the stop sign just 1 pixel off was really ugly. --- src/preferences/screensaver/ScreenCornerSelector.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/preferences/screensaver/ScreenCornerSelector.cpp b/src/preferences/screensaver/ScreenCornerSelector.cpp index f63917a27f..17ac75e376 100644 --- a/src/preferences/screensaver/ScreenCornerSelector.cpp +++ b/src/preferences/screensaver/ScreenCornerSelector.cpp @@ -199,12 +199,15 @@ ScreenCornerSelector::_DrawStop(BRect innerFrame) SetHighColor(255, 0, 0); SetPenSize(2); + SetFlags(Flags() | B_SUBPIXEL_PRECISE); + StrokeEllipse(rect); - size -= ceilf(sin(M_PI / 4) * size + 2); + size -= sin(M_PI / 4) * size + 2; rect.InsetBy(size, size); StrokeLine(rect.RightTop(), rect.LeftBottom()); + SetFlags(Flags() & ~B_SUBPIXEL_PRECISE); SetPenSize(1); }