* With blessing from Stefano applied my alternative patch
from ticket #6415: the drawing offset of a BPicture becomes the new drawing origin. * This should also close ticket #6008. * Also the Preview printer does the clipping now correctly outside the "printable rectangle". git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37939 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
081dd39e94
commit
ab7c7773b2
|
@ -515,12 +515,14 @@ draw_picture(View* view, BPoint where, int32 token)
|
|||
ServerPicture* picture
|
||||
= view->Window()->ServerWindow()->App()->GetPicture(token);
|
||||
if (picture != NULL) {
|
||||
BPoint origin = view->DrawingOrigin();
|
||||
view->PushState();
|
||||
view->SetDrawingOrigin(where);
|
||||
|
||||
view->PushState();
|
||||
picture->Play(view);
|
||||
view->PopState();
|
||||
view->SetDrawingOrigin(origin);
|
||||
|
||||
view->PopState();
|
||||
picture->ReleaseReference();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2783,17 +2783,14 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code,
|
|||
if (link.Read<BPoint>(&where) == B_OK) {
|
||||
ServerPicture* picture = App()->GetPicture(token);
|
||||
if (picture != NULL) {
|
||||
// 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->PushState();
|
||||
fCurrentView->SetDrawingOrigin(where);
|
||||
|
||||
fCurrentView->PushState();
|
||||
picture->Play(fCurrentView);
|
||||
fCurrentView->PopState();
|
||||
|
||||
fCurrentView->SetDrawingOrigin(origin);
|
||||
fCurrentView->PopState();
|
||||
|
||||
picture->ReleaseReference();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue