r19026 by fschmid - Fixed Bug #12191: PDF import wrong (inkscape exported; with patterns)
scribus-commit
scribus-commit at lists.scribus.net
Wed Apr 9 19:45:10 UTC 2014
Author: fschmid
Date: Wed Apr 9 19:45:10 2014
New Revision: 19026
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19026
Log:
Fixed Bug #12191: PDF import wrong (inkscape exported; with patterns)
Modified:
trunk/Scribus/scribus/plugins/import/ai/importai.cpp
trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/paintmanager.cpp
Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19026&path=/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importai.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ai/importai.cpp Wed Apr 9 19:45:10 2014
@@ -2744,7 +2744,7 @@
PageItem* currItem = tmpSel->itemAt(0);
currItem->setItemName(currentPatternDefName);
m_Doc->DoDrawing = true;
- QImage tmpImg = currItem->DrawObj_toImage(qMax(qRound(patternX2 - patternX1), qRound(patternY2 - patternY1)));
+ QImage tmpImg = currItem->DrawObj_toImage(qMin(qMax(qRound(patternX2 - patternX1), qRound(patternY2 - patternY1)), 500));
if (!tmpImg.isNull())
{
QImage retImg = QImage(qRound(patternX2 - patternX1), qRound(patternY2 - patternY1), QImage::Format_ARGB32_Premultiplied);
@@ -2888,7 +2888,7 @@
PageItem* currItem = tmpSel->itemAt(0);
currItem->setItemName(currentPatternDefName);
m_Doc->DoDrawing = true;
- pat.pattern = currItem->DrawObj_toImage(qMax(tmpSel->width(), tmpSel->height()));
+ pat.pattern = currItem->DrawObj_toImage(qMin(qMax(tmpSel->width(), tmpSel->height()), 500.0));
if (!pat.pattern.isNull())
{
pat.width = tmpSel->width();
Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19026&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp Wed Apr 9 19:45:10 2014
@@ -1404,7 +1404,7 @@
ScPattern pat = ScPattern();
pat.setDoc(m_doc);
m_doc->DoDrawing = true;
- pat.pattern = ite->DrawObj_toImage(qMax(ite->width(), ite->height()));
+ pat.pattern = ite->DrawObj_toImage(qMin(qMax(ite->width(), ite->height()), 500.0));
pat.xoffset = 0;
pat.yoffset = 0;
m_doc->DoDrawing = false;
@@ -2258,7 +2258,7 @@
ScPattern pat = ScPattern();
pat.setDoc(m_doc);
m_doc->DoDrawing = true;
- pat.pattern = ite->DrawObj_toImage(qMax(ite->width(), ite->height()));
+ pat.pattern = ite->DrawObj_toImage(qMin(qMax(ite->width(), ite->height()), 500.0));
pat.xoffset = 0;
pat.yoffset = 0;
m_doc->DoDrawing = false;
Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19026&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp Wed Apr 9 19:45:10 2014
@@ -2830,7 +2830,7 @@
currItem->gXpos = currItem->xPos() - minx;
currItem->gYpos = currItem->yPos() - miny;
currItem->setXYPos(currItem->gXpos, currItem->gYpos, true);
- pat.pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
+ pat.pattern = currItem->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
pat.width = maxx - minx;
pat.height = maxy - miny;
m_Doc->DoDrawing = false;
@@ -2877,7 +2877,7 @@
pat.setDoc(m_Doc);
PageItem* currItem = GElements.at(0);
m_Doc->DoDrawing = true;
- pat.pattern = currItem->DrawObj_toImage(qMax(wpat, hpat));
+ pat.pattern = currItem->DrawObj_toImage(qMin(qMax(wpat, hpat), 500.0));
double xOrg = 0.0;
double yOrg = 0.0;
if (inGroupXOrigin < 0.0)
Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19026&path=/trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxar.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxar.cpp Wed Apr 9 19:45:10 2014
@@ -3691,7 +3691,7 @@
if (gg.isBrush)
{
m_Doc->DoDrawing = true;
- QImage tmpImg = groupItem->DrawObj_toImage(qMax(groupItem->width(), groupItem->height()));
+ QImage tmpImg = groupItem->DrawObj_toImage(qMin(qMax(groupItem->width(), groupItem->height()), 500.0));
ScPattern pat = ScPattern();
pat.setDoc(m_Doc);
pat.width = groupItem->width();
Modified: trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19026&path=/trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xps/importxps.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xps/importxps.cpp Wed Apr 9 19:45:10 2014
@@ -1470,7 +1470,7 @@
ScPattern pat = ScPattern();
pat.setDoc(m_Doc);
m_Doc->DoDrawing = true;
- QImage tmpImg = item->DrawObj_toImage(qMax(item->width(), item->height()));
+ QImage tmpImg = item->DrawObj_toImage(qMin(qMax(item->width(), item->height()), 500.0));
if (!tmpImg.isNull())
{
QImage retImg = QImage(qRound(Viewport_x2 * conversionFactor), qRound(Viewport_y2 * conversionFactor), QImage::Format_ARGB32_Premultiplied);
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19026&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Apr 9 19:45:10 2014
@@ -9818,7 +9818,7 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- pat.pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
+ pat.pattern = currItem->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
pat.width = maxx - minx;
pat.height = maxy - miny;
pat.items.append(currItem);
@@ -9929,7 +9929,7 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- pat.pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
+ pat.pattern = currItem->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
pat.width = maxx - minx;
pat.height = maxy - miny;
pat.items.append(currItem);
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19026&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Apr 9 19:45:10 2014
@@ -5218,7 +5218,7 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
+ docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
}
}
@@ -6704,7 +6704,7 @@
currItem->gXpos = currItem->xPos() - minx;
currItem->gYpos = currItem->yPos() - miny;
currItem->setXYPos(currItem->gXpos, currItem->gYpos, true);
- docPatterns[currentEditedSymbol].pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
+ docPatterns[currentEditedSymbol].pattern = currItem->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
docPatterns[currentEditedSymbol].width = maxx - minx;
docPatterns[currentEditedSymbol].height = maxy - miny;
}
@@ -6716,7 +6716,7 @@
PageItem *currItem = Items->at(0);
double x1, x2, y1, y2;
currItem->getVisualBoundingRect(&x1, &y1, &x2, &y2);
- docPatterns[m_ScMW->patternsDependingOnThis[a]].pattern = currItem->DrawObj_toImage(qMax(x2 - x1, y2 - y1));
+ docPatterns[m_ScMW->patternsDependingOnThis[a]].pattern = currItem->DrawObj_toImage(qMin(qMax(x2 - x1, y2 - y1), 500.0));
}
}
if (masterPageMode())
@@ -10201,8 +10201,7 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
-// docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(pa.items, 1.0);
+ docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
}
if (updated)
{
@@ -10345,7 +10344,7 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
+ docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
}
}
if (updated)
@@ -10590,7 +10589,7 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
+ docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
}
regionsChanged()->update(QRectF());
changed();
@@ -10698,8 +10697,7 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
-// docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(pa.items, 1.0);
+ docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
}
if (updated)
{
Modified: trunk/Scribus/scribus/ui/paintmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19026&path=/trunk/Scribus/scribus/ui/paintmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/paintmanager.cpp (original)
+++ trunk/Scribus/scribus/ui/paintmanager.cpp Wed Apr 9 19:45:10 2014
@@ -1341,7 +1341,7 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- pat.pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
+ pat.pattern = currItem->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
pat.width = maxx - minx;
pat.height = maxy - miny;
currItem->setXYPos(0, 0, true);
More information about the scribus-commit
mailing list