* push the states on the server instead on the client side
* DrawState::SetOrigin needs to take the view scaling into account * set the orgin in BPrintJob, to be able to print more then one page properly Note: This would make printing work on HAIKU as on BeOS, but still it does not because of 1; BPortLink size limit and 2; because we can only print/ draw the visible region of a view? I had to resize StyledEdit to a i.e 10000 to test and to be able to print the full syslog. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24682 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1ed6a33cc5
commit
5d81827b2c
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user