Patch mostly by jackburton: The global offset for drawing a BPicture needs to
be applied before pushing a drawing state, otherwise it is not preserved throughout playing the picture data. I've added the comment and resetting the drawing origin to the previous value. Fixes ticket #6070, thanks! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36933 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c436ab319d
commit
3e711c79d8
|
@ -2789,13 +2789,18 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code,
|
||||||
if (link.Read<BPoint>(&where) == B_OK) {
|
if (link.Read<BPoint>(&where) == B_OK) {
|
||||||
ServerPicture* picture = App()->GetPicture(token);
|
ServerPicture* picture = App()->GetPicture(token);
|
||||||
if (picture != NULL) {
|
if (picture != NULL) {
|
||||||
fCurrentView->PushState();
|
// Setting the drawing origin outside of the
|
||||||
|
// state makes sure that everything the picture
|
||||||
|
// does is relative to the global picture offset.
|
||||||
|
BPoint origin = fCurrentView->DrawingOrigin();
|
||||||
fCurrentView->SetDrawingOrigin(where);
|
fCurrentView->SetDrawingOrigin(where);
|
||||||
picture->Play(fCurrentView);
|
|
||||||
|
|
||||||
|
fCurrentView->PushState();
|
||||||
|
picture->Play(fCurrentView);
|
||||||
fCurrentView->PopState();
|
fCurrentView->PopState();
|
||||||
|
|
||||||
|
fCurrentView->SetDrawingOrigin(origin);
|
||||||
|
|
||||||
picture->ReleaseReference();
|
picture->ReleaseReference();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue