From cf42e48ef150f74f758d8f3248f5f3f3be782602 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Tue, 25 Dec 2007 22:47:19 +0000 Subject: [PATCH] call Draw() between PushState/PopState. Added some Todo. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23157 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/PrintJob.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/PrintJob.cpp b/src/kits/interface/PrintJob.cpp index e3d69a3180..ecbab11bc7 100644 --- a/src/kits/interface/PrintJob.cpp +++ b/src/kits/interface/PrintJob.cpp @@ -266,8 +266,9 @@ BPrintJob::~BPrintJob() fCurrentPageHeader = NULL; } -static -status_t ConfigPageThread(void *data) + +static status_t +ConfigPageThread(void *data) { BPrivate::Configuration* configuration = static_cast(data); @@ -581,6 +582,7 @@ BPrintJob::IsSettingsMessageValid(BMessage *message) const return valid; } + // Either SetSettings() or ConfigPage() has to be called prior // to any of the getters otherwise they return undefined values. BRect @@ -654,10 +656,14 @@ BPrintJob::RecurseView(BView *view, BPoint origin, BPicture *picture, BRect rect) { ASSERT(picture != NULL); - + // TODO: test what happens if views don't have + // the B_WILL_DRAW flag or have B_DRAW_ON_CHILDREN + view->AppendToPicture(picture); view->f_is_printing = true; + view->PushState(); view->Draw(rect); + view->PopState(); view->f_is_printing = false; view->EndPicture();