r21822 by jghali - #14675: Zoomed images are blurred after image export, but only when grouped

scribus-commit scribus-commit at lists.scribus.net
Mon Mar 13 19:01:10 UTC 2017


Author: jghali
Date: Mon Mar 13 19:01:10 2017
New Revision: 21822

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21822
Log:
#14675: Zoomed images are blurred after image export, but only when grouped

Modified:
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21822&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Mon Mar 13 19:01:10 2017
@@ -2788,10 +2788,15 @@
 	PageItem* currItem;
 	if (page->FromMaster.count() != 0)
 	{
-		uint pageFromMasterCount = page->FromMaster.count();
-		for (uint a = 0; a < pageFromMasterCount; ++a)
-		{
-			currItem = page->FromMaster.at(a);
+		QList<PageItem*> itemList = page->FromMaster;
+		while (itemList.count() > 0)
+		{
+			currItem = itemList.takeFirst();
+			if (currItem->isGroup())
+			{
+				itemList = currItem->getItemList() + itemList;
+				continue;
+			}
 			if (!currItem->asImageFrame() || !currItem->imageIsAvailable)
 				continue;
 			if (currItem->pixm.imgInfo.lowResType == 0)
@@ -2813,10 +2818,21 @@
 	{
 		FPoint orig = m_canvas->localToCanvas(QPoint(clipx, clipy));
 		QRectF cullingArea = QRectF(orig.x(), orig.y(), qRound(clipw / sc + 0.5), qRound(cliph / sc + 0.5));
-		for (int it = 0; it < Doc->Items->count(); ++it)
-		{
-			currItem = Doc->Items->at(it);
-			if (!cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
+		QList<PageItem*> itemList = *(Doc->Items);
+		while (itemList.count() > 0)
+		{
+			currItem = itemList.takeFirst();
+			if (currItem->isGroup())
+			{
+				itemList = currItem->getItemList() + itemList;
+				continue;
+			}
+			double w = currItem->visualWidth();
+			double h = currItem->visualHeight();
+			double x = -currItem->visualLineWidth() / 2.0;
+			double y = -currItem->visualLineWidth() / 2.0;
+			QRectF boundingRect = currItem->getTransform().mapRect(QRectF(x, y, w, h));
+			if (!cullingArea.intersects(boundingRect.adjusted(0.0, 0.0, 1.0, 1.0)))
 				continue;
 			if (!currItem->asImageFrame() || !currItem->imageIsAvailable)
 				continue;




More information about the scribus-commit mailing list