Set the page origin to the left/top point of the printable rectangle (was page rectangle).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9275 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
#include "ValidRect.h"
|
#include "ValidRect.h"
|
||||||
#include "DbgMsg.h"
|
#include "DbgMsg.h"
|
||||||
|
|
||||||
|
|
||||||
#if (!__MWERKS__ || defined(MSIPL_USING_NAMESPACE))
|
#if (!__MWERKS__ || defined(MSIPL_USING_NAMESPACE))
|
||||||
using namespace std;
|
using namespace std;
|
||||||
#else
|
#else
|
||||||
@@ -67,8 +68,11 @@ bool PSDriver::endPage(int)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PSDriver::setupCTM() {
|
void PSDriver::setupCTM() {
|
||||||
|
const float leftMargin = getJobData()->getPrintableRect().left;
|
||||||
|
const float topMargin = getJobData()->getPrintableRect().top;
|
||||||
// move origin from bottom left to top left
|
// move origin from bottom left to top left
|
||||||
writeSpoolString("0 %f translate\n", getJobData()->getPaperRect().Height());
|
// and set margin
|
||||||
|
writeSpoolString("%f %f translate\n", leftMargin, getJobData()->getPaperRect().Height()-topMargin);
|
||||||
// y values increase from top to bottom
|
// y values increase from top to bottom
|
||||||
// units of measure is dpi
|
// units of measure is dpi
|
||||||
writeSpoolString("72 %d div 72 -%d div scale\n", getJobData()->getXres(), getJobData()->getYres());
|
writeSpoolString("72 %d div 72 -%d div scale\n", getJobData()->getXres(), getJobData()->getYres());
|
||||||
|
|||||||
Reference in New Issue
Block a user