Added (untested) support for landscape orientation.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8978 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2004-09-15 16:16:39 +00:00
parent cd6bfb01f3
commit 82f24520e1

View File

@ -220,7 +220,7 @@ void PCL6Driver::jobStart()
"@PJL SET RESOLUTION=%d\n"
"@PJL ENTER LANGUAGE=PCLXL\n"
") HP-PCL XL;1;1;"
"Comment Copyright (c) 2003 OBOS\n",
"Comment Copyright (c) 2003, 2004 Haiku\n",
getJobData()->getXres());
// PCL6 begin
fStream = HP_NewStream(16 * 1024, this);
@ -230,8 +230,11 @@ void PCL6Driver::jobStart()
bool PCL6Driver::startPage(int)
{
// XXX orientation
HP_BeginPage_3(fStream, HP_ePortraitOrientation, mediaSize(getJobData()->getPaper()), HP_eAutoSelect);
HP_UByte orientation = HP_ePortraitOrientation;
if (getJobData()->getOrientation() == JobData::kLandscape) {
orientation = HP_eLandscapeOrientation;
}
HP_BeginPage_3(fStream, orientation, mediaSize(getJobData()->getPaper()), HP_eAutoSelect);
// PageOrigin from Windows NT printer driver
int x = 142 * getJobData()->getXres() / 600;
int y = 100 * getJobData()->getYres() / 600;