Fixed printing related bug. Image was offset by the left, top corner of the printable rectangle.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10606 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer
2005-01-07 17:02:23 +00:00
parent 34720c47f1
commit 5eb50e4689
+5 -2
View File
@@ -567,8 +567,9 @@ ShowImageWindow::MessageReceived(BMessage *pmsg)
}
BString str;
if (pmsg->FindString("status", &str) == B_OK)
if (pmsg->FindString("status", &str) == B_OK) {
status << str;
}
fStatusView->SetText(status);
@@ -1058,7 +1059,9 @@ ShowImageWindow::Print(BMessage *msg)
// XXX: eventually print large images on several pages
printJob.BeginJob();
fImageView->SetScale(width / imageWidth);
printJob.DrawView(fImageView, bitmap->Bounds(), BPoint(printableRect.left, printableRect.top));
// coordinates are relative to printable rectangle
BRect bounds(bitmap->Bounds());
printJob.DrawView(fImageView, bounds, BPoint(0, 0));
fImageView->SetScale(1.0);
printJob.SpoolPage();
printJob.CommitJob();