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:
@@ -199,12 +199,15 @@ ScreenCornerSelector::_DrawStop(BRect innerFrame)
|
|||||||
|
|
||||||
SetHighColor(255, 0, 0);
|
SetHighColor(255, 0, 0);
|
||||||
SetPenSize(2);
|
SetPenSize(2);
|
||||||
|
SetFlags(Flags() | B_SUBPIXEL_PRECISE);
|
||||||
|
|
||||||
StrokeEllipse(rect);
|
StrokeEllipse(rect);
|
||||||
|
|
||||||
size -= ceilf(sin(M_PI / 4) * size + 2);
|
size -= sin(M_PI / 4) * size + 2;
|
||||||
rect.InsetBy(size, size);
|
rect.InsetBy(size, size);
|
||||||
StrokeLine(rect.RightTop(), rect.LeftBottom());
|
StrokeLine(rect.RightTop(), rect.LeftBottom());
|
||||||
|
|
||||||
|
SetFlags(Flags() & ~B_SUBPIXEL_PRECISE);
|
||||||
SetPenSize(1);
|
SetPenSize(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user