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.
This commit is contained in:
Adrien Destugues 2014-10-20 09:03:35 +02:00
parent 6177acdb79
commit b5440720ae

View File

@ -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);
}