r15013 by jghali - a few fixes for print preview related to latest changes in pslib
scribus-commit
scribus-commit at lists.scribus.net
Sun Apr 25 21:50:20 CEST 2010
Revision: 15013
Author: jghali
Date: 2010-04-25T19:46:05.390477Z
Commit message: a few fixes for print preview related to latest changes in pslib
Changeset:
M /branches/Version135/Scribus/scribus/preview.cpp
Diffs:
Index: scribus/preview.cpp
===================================================================
--- scribus/preview.cpp (revision 15012)
+++ scribus/preview.cpp (revision 15013)
@@ -46,6 +46,8 @@
#include <QSpinBox>
#include <cstdlib>
+#include <algorithm>
+
#include "pslib.h"
#include "checkDocument.h"
#include "cmsettings.h"
@@ -618,6 +620,9 @@
QString tmp, tmp2, tmp3;
double b = doc->Pages->at(Seite)->width() * Res / 72.0;
double h = doc->Pages->at(Seite)->height() * Res / 72.0;
+ if (doc->Pages->at(Seite)->PageOri == 1)
+ std::swap(b, h);
+
args.append( "-q" );
args.append( "-dNOPAUSE" );
args.append( "-dPARANOIDSAFER" );
@@ -720,6 +725,8 @@
QString tmp, tmp2, tmp3;
double b = doc->Pages->at(Seite)->width() * Res / 72.0;
double h = doc->Pages->at(Seite)->height() * Res / 72.0;
+ if (doc->Pages->at(Seite)->PageOri == 1)
+ std::swap(b, h);
args1.append( "-q" );
args1.append( "-dNOPAUSE" );
@@ -922,6 +929,8 @@
bool mode;
int w = qRound(b);
int h2 = qRound(h);
+ if (doc->Pages->at(Seite)->PageOri == 1)
+ std::swap(w, h2);
image = QImage(w, h2, QImage::Format_ARGB32);
QRgb clean = qRgba(0, 0, 0, 0);
for( int yi=0; yi < h2; ++yi )
@@ -1232,6 +1241,9 @@
}
}
}
+ const Page* page = doc->Pages->at(Seite);
+ if ((page->PageOri == 1) && (image.width() < image.height()))
+ image = image.transformed( QMatrix(0, 1, -1, 0, 0, 0) );
if (AliasTr->isChecked())
{
Bild = QPixmap(image.width(), image.height());
More information about the scribus-commit
mailing list