diff --git a/src/apps/remotedesktop/RemoteView.cpp b/src/apps/remotedesktop/RemoteView.cpp index 485c4752cf..645b27f163 100644 --- a/src/apps/remotedesktop/RemoteView.cpp +++ b/src/apps/remotedesktop/RemoteView.cpp @@ -1007,8 +1007,16 @@ RemoteView::_DrawThread() archive.AddPoint("pts", point); } - // the shape is in absolute coordinates - offscreen->MovePenTo(0, 0); + BPoint offset; + message.Read(offset); + + float scale; + if (message.Read(scale) != B_OK) + continue; + + offscreen->PushState(); + offscreen->MovePenTo(offset); + offscreen->SetScale(scale); BShape shape(&archive); if (code == RP_STROKE_SHAPE) { @@ -1018,13 +1026,16 @@ RemoteView::_DrawThread() offscreen->FillShape(&shape, pattern); else { BGradient *gradient; - if (message.ReadGradient(&gradient) != B_OK) + if (message.ReadGradient(&gradient) != B_OK) { + offscreen->PopState(); continue; + } offscreen->FillShape(&shape, *gradient); delete gradient; } + offscreen->PopState(); invalidRegion.Include(bounds); break; } diff --git a/src/servers/app/drawing/remote/RemoteDrawingEngine.cpp b/src/servers/app/drawing/remote/RemoteDrawingEngine.cpp index adfa74975f..818b1aaecb 100644 --- a/src/servers/app/drawing/remote/RemoteDrawingEngine.cpp +++ b/src/servers/app/drawing/remote/RemoteDrawingEngine.cpp @@ -721,7 +721,8 @@ RemoteDrawingEngine::DrawShape(const BRect& bounds, int32 opCount, message.AddList(opList, opCount); message.Add(pointCount); message.AddList(pointList, pointCount); - // TODO: viewToScreenOffset and viewScale + message.Add(viewToScreenOffset); + message.Add(viewScale); } @@ -743,7 +744,8 @@ RemoteDrawingEngine::FillShape(const BRect& bounds, int32 opCount, message.Add(pointCount); message.AddList(pointList, pointCount); message.AddGradient(gradient); - // TODO: viewToScreenOffset and viewScale + message.Add(viewToScreenOffset); + message.Add(viewScale); }