app_server: Fix clipping computation in DrawArc
The clipped rect was extended with the stroke width, and then the result was overwritten. Fixes #3130.
This commit is contained in:
@@ -649,12 +649,11 @@ DrawingEngine::DrawArc(BRect r, const float& angle, const float& span,
|
|||||||
|
|
||||||
make_rect_valid(r);
|
make_rect_valid(r);
|
||||||
fPainter->AlignEllipseRect(&r, filled);
|
fPainter->AlignEllipseRect(&r, filled);
|
||||||
BRect clipped(r);
|
|
||||||
|
|
||||||
if (!filled)
|
if (!filled)
|
||||||
extend_by_stroke_width(clipped, fPainter->PenSize());
|
extend_by_stroke_width(r, fPainter->PenSize());
|
||||||
|
|
||||||
clipped = fPainter->TransformAndClipRect(r);
|
BRect clipped(fPainter->TransformAndClipRect(r));
|
||||||
|
|
||||||
if (clipped.IsValid()) {
|
if (clipped.IsValid()) {
|
||||||
AutoFloatingOverlaysHider _(fGraphicsCard, clipped);
|
AutoFloatingOverlaysHider _(fGraphicsCard, clipped);
|
||||||
@@ -682,9 +681,7 @@ DrawingEngine::FillArc(BRect r, const float& angle, const float& span,
|
|||||||
|
|
||||||
make_rect_valid(r);
|
make_rect_valid(r);
|
||||||
fPainter->AlignEllipseRect(&r, true);
|
fPainter->AlignEllipseRect(&r, true);
|
||||||
BRect clipped(r);
|
BRect clipped(fPainter->TransformAndClipRect(r));
|
||||||
|
|
||||||
clipped = fPainter->TransformAndClipRect(r);
|
|
||||||
|
|
||||||
if (clipped.IsValid()) {
|
if (clipped.IsValid()) {
|
||||||
AutoFloatingOverlaysHider _(fGraphicsCard, clipped);
|
AutoFloatingOverlaysHider _(fGraphicsCard, clipped);
|
||||||
|
|||||||
Reference in New Issue
Block a user