diff --git a/src/servers/app/ServerPicture.cpp b/src/servers/app/ServerPicture.cpp index d02e5060c3..1c115dcf6c 100644 --- a/src/servers/app/ServerPicture.cpp +++ b/src/servers/app/ServerPicture.cpp @@ -293,19 +293,26 @@ fill_rect(DrawingContext* context, BRect rect) static void -stroke_round_rect(DrawingContext* context, BRect rect, BPoint radii) +draw_round_rect(DrawingContext* context, BRect rect, BPoint radii, bool fill) { context->ConvertToScreenForDrawing(&rect); - context->GetDrawingEngine()->DrawRoundRect(rect, radii.x, - radii.y, false); + float scale = context->CurrentState()->CombinedScale(); + context->GetDrawingEngine()->DrawRoundRect(rect, radii.x * scale, + radii.y * scale, fill); +} + + +static void +stroke_round_rect(DrawingContext* context, BRect rect, BPoint radii) +{ + draw_round_rect(context, rect, radii, false); } static void fill_round_rect(DrawingContext* context, BRect rect, BPoint radii) { - context->ConvertToScreenForDrawing(&rect); - context->GetDrawingEngine()->DrawRoundRect(rect, radii.x, radii.y, true); + draw_round_rect(context, rect, radii, true); } diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index c308149bc5..14ebd3f51c 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -2451,14 +2451,16 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code, Title())); BRect rect; - float xrad,yrad; + float xRadius; + float yRadius; link.Read(&rect); - link.Read(&xrad); - if (link.Read(&yrad) != B_OK) + link.Read(&xRadius); + if (link.Read(&yRadius) != B_OK) break; fCurrentView->ConvertToScreenForDrawing(&rect); - drawingEngine->DrawRoundRect(rect, xrad, yrad, + float scale = fCurrentView->CurrentState()->CombinedScale(); + drawingEngine->DrawRoundRect(rect, xRadius * scale, yRadius * scale, code == AS_FILL_ROUNDRECT); break; }