diff --git a/src/kits/interface/PrintJob.cpp b/src/kits/interface/PrintJob.cpp index 6b8b779b15..5462a26339 100644 --- a/src/kits/interface/PrintJob.cpp +++ b/src/kits/interface/PrintJob.cpp @@ -531,7 +531,7 @@ BPrintJob::DrawView(BView *view, BRect rect, BPoint where) if (view->LockLooper()) { BPicture picture; - _RecurseView(view, where, &picture, rect); + _RecurseView(view, B_ORIGIN - rect.LeftTop(), &picture, rect); _AddPicture(picture, rect, where); view->UnlockLooper(); } @@ -664,6 +664,7 @@ BPrintJob::_RecurseView(BView *view, BPoint origin, view->AppendToPicture(picture); view->f_is_printing = true; view->PushState(); + view->SetOrigin(origin); view->Draw(rect); view->PopState(); view->f_is_printing = false; diff --git a/src/servers/app/DrawState.cpp b/src/servers/app/DrawState.cpp index 8cfa17054d..8e2f3bc6fe 100644 --- a/src/servers/app/DrawState.cpp +++ b/src/servers/app/DrawState.cpp @@ -283,10 +283,15 @@ DrawState::SetOrigin(const BPoint& origin) // NOTE: the origins of earlier states are never expected to // change, only the topmost state ever changes - if (fPreviousState) - fCombinedOrigin = fPreviousState->fCombinedOrigin + fOrigin; - else - fCombinedOrigin = fOrigin; + if (fPreviousState) { + fCombinedOrigin.x = fPreviousState->fCombinedOrigin.x + + fOrigin.x * fPreviousState->fCombinedScale; + fCombinedOrigin.y = fPreviousState->fCombinedOrigin.y + + fOrigin.y * fPreviousState->fCombinedScale; + } else { + fCombinedOrigin.x = fOrigin.x * fCombinedScale; + fCombinedOrigin.y = fOrigin.y * fCombinedScale; + } } diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index 31a3e8e149..b9aefc9168 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -2364,8 +2364,12 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code, BPrivate::LinkReceiver &li ServerPicture *picture = App()->FindPicture(token); if (picture != NULL) { - fCurrentView->CurrentState()->SetOrigin(where); + fCurrentView->PushState(); + fCurrentView->SetDrawingOrigin(where); + fCurrentView->PushState(); picture->Play(fCurrentView); + fCurrentView->PopState(); + fCurrentView->PopState(); } } break;