r24292 by craig - Replace QMatrix by QTransform

scribus-commit scribus-commit at lists.scribus.net
Thu Nov 26 17:46:26 UTC 2020


Author: craig
Date: Thu Nov 26 17:46:26 2020
New Revision: 24292

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24292
Log:
Replace QMatrix by QTransform

Modified:
    trunk/Scribus/scribus/pdf_analyzer.cpp
    trunk/Scribus/scribus/pdf_analyzer.h
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.h
    trunk/Scribus/scribus/printpreviewcreator_gdi.cpp
    trunk/Scribus/scribus/printpreviewcreator_ps.cpp
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/ui/outputpreview_ps.cpp

Modified: trunk/Scribus/scribus/pdf_analyzer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24292&path=/trunk/Scribus/scribus/pdf_analyzer.cpp
==============================================================================
--- trunk/Scribus/scribus/pdf_analyzer.cpp	(original)
+++ trunk/Scribus/scribus/pdf_analyzer.cpp	Thu Nov 26 17:46:26 2020
@@ -257,7 +257,7 @@
 						{
 							mt[i] = args[i].GetReal();
 						}
-						QMatrix transMatrix(mt[0], mt[1], mt[2], mt[3], mt[4], mt[5]);
+						QTransform transMatrix(mt[0], mt[1], mt[2], mt[3], mt[4], mt[5]);
 						currGS.ctm = transMatrix*currGS.ctm;
 					}
 					}

Modified: trunk/Scribus/scribus/pdf_analyzer.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24292&path=/trunk/Scribus/scribus/pdf_analyzer.h
==============================================================================
--- trunk/Scribus/scribus/pdf_analyzer.h	(original)
+++ trunk/Scribus/scribus/pdf_analyzer.h	Thu Nov 26 17:46:26 2020
@@ -11,7 +11,7 @@
 #include <QList>
 #include <QPair>
 #include <QString>
-#include <QMatrix>
+#include <QTransform>
 #include "scconfig.h"
 
 #ifdef HAVE_PODOFO
@@ -87,7 +87,7 @@
 };
 struct PDFGraphicState
 {
-	QMatrix ctm;
+	QTransform ctm;
 	PDFColorSpace strokeCS;
 	PDFColorSpace fillCS;
 	QList<double> strokeColor;

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24292&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.h	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.h	Thu Nov 26 17:46:26 2020
@@ -19,7 +19,6 @@
 #include <QSizeF>
 #include <QString>
 #include <QTextStream>
-#include <QTransform>
 
 #include <memory>
 
@@ -30,7 +29,6 @@
 #include "sccolor.h"
 
 class QColor;
-class QMatrix;
 
 class MultiProgressDialog;
 class ScribusDoc;

Modified: trunk/Scribus/scribus/printpreviewcreator_gdi.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24292&path=/trunk/Scribus/scribus/printpreviewcreator_gdi.cpp
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_gdi.cpp	(original)
+++ trunk/Scribus/scribus/printpreviewcreator_gdi.cpp	Thu Nov 26 17:46:26 2020
@@ -9,6 +9,7 @@
 #include <QFileInfo>
 #include <QImage>
 #include <QTemporaryFile>
+#include <QTransform>
 
 #include "iconmanager.h"
 #include "printpreviewcreator_gdi.h"
@@ -84,7 +85,7 @@
 
 	const ScPage* page = m_doc->Pages->at(pageIndex);
 	if ((page->orientation() == 1) && (image.width() < image.height()))
-		image = image.transformed( QMatrix(0, 1, -1, 0, 0, 0) );
+		image = image.transformed( QTransform(0, 1, -1, 0, 0, 0) );
 	if (m_showTransparency)
 	{
 		pixmap = QPixmap(image.width(), image.height());

Modified: trunk/Scribus/scribus/printpreviewcreator_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24292&path=/trunk/Scribus/scribus/printpreviewcreator_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_ps.cpp	(original)
+++ trunk/Scribus/scribus/printpreviewcreator_ps.cpp	Thu Nov 26 17:46:26 2020
@@ -9,6 +9,7 @@
 #include <QFileInfo>
 #include <QImage>
 #include <QTemporaryFile>
+#include <QTransform>
 
 #include "commonstrings.h"
 #include "cmsettings.h"
@@ -303,7 +304,7 @@
 
 	const ScPage* page = m_doc->Pages->at(pageIndex);
 	if ((page->orientation() == 1) && (image.width() < image.height()))
-		image = image.transformed( QMatrix(0, 1, -1, 0, 0, 0) );
+		image = image.transformed( QTransform(0, 1, -1, 0, 0, 0) );
 	if (m_showTransparency)
 	{
 		pixmap = QPixmap(image.width(), image.height());

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24292&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Thu Nov 26 17:46:26 2020
@@ -39,6 +39,7 @@
 #include <QRegExp>
 #include <QtAlgorithms>
 #include <QTime>
+#include <QTransform>
 //#include <qtconcurrentmap.h>
 
 #include "actionmanager.h"
@@ -16366,10 +16367,10 @@
 		return;
 	Canvas::FrameHandle fh = (Canvas::FrameHandle) direction;
 	ScPage *currPage = Pages->at(item->OwnPage);
-	QMatrix ma;
-	ma.translate(item->xPos(), item->yPos());
-	double inX = ma.dx() - m_currentPage->xOffset();
-	double inY = ma.dy() - m_currentPage->yOffset();
+	QTransform transform;
+	transform.translate(item->xPos(), item->yPos());
+	double inX = transform.dx() - m_currentPage->xOffset();
+	double inY = transform.dy() - m_currentPage->yOffset();
 	if (fh == Canvas::NORTH || fh == Canvas::NORTHWEST || fh == Canvas::NORTHEAST)
 	{
 		double top = currPage->topMargin();

Modified: trunk/Scribus/scribus/ui/outputpreview_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24292&path=/trunk/Scribus/scribus/ui/outputpreview_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_ps.cpp	(original)
+++ trunk/Scribus/scribus/ui/outputpreview_ps.cpp	Thu Nov 26 17:46:26 2020
@@ -10,6 +10,7 @@
 #include <QApplication>
 #include <QDesktopWidget>
 #include <QMap>
+#include <QTransform>
 #include <QTemporaryFile>
 
 #include "outputpreview_ps.h"
@@ -530,7 +531,7 @@
 
 	const ScPage* page = m_doc->Pages->at(pageIndex);
 	if ((page->orientation() == 1) && (image.width() < image.height()))
-		image = image.transformed( QMatrix(0, 1, -1, 0, 0, 0) );
+		image = image.transformed( QTransform(0, 1, -1, 0, 0, 0) );
 	if (m_optionsUi->showTransparency->isChecked())
 	{
 		pixmap = QPixmap(image.width(), image.height());
@@ -1006,4 +1007,4 @@
 	pixmap = QPixmap(1, 1);
 	qApp->restoreOverrideCursor();
 	updateOptionsFromUI();
-}
+}




More information about the scribus-commit mailing list