r13932 by fschmid - Fixed broken output of patterns in pdf and postscript export.
scribus-commit
scribus-commit at lists.scribus.net
Fri Aug 28 13:35:39 CEST 2009
Revision: 13932
Author: fschmid
Date: 2009-08-28T11:35:58.208902Z
Commit message: Fixed broken output of patterns in pdf and postscript export.
Changeset:
M /trunk/Scribus/scribus/scimage.cpp
M /trunk/Scribus/scribus/pslib.cpp
M /trunk/Scribus/scribus/scribus.cpp
Diffs:
Index: scribus/scimage.cpp
===================================================================
--- scribus/scimage.cpp (revision 13931)
+++ scribus/scimage.cpp (revision 13932)
@@ -1807,6 +1807,8 @@
if (pDataLoader)
pDataLoader->setRequest(imgInfo.isRequest, imgInfo.RequestProps);
}
+ else if (ext == "pat")
+ pDataLoader = new ScImgDataLoader_GIMP();
else
pDataLoader = new ScImgDataLoader_QT();
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp (revision 13931)
+++ scribus/scribus.cpp (revision 13932)
@@ -9594,7 +9594,9 @@
pat.height = currItem->gHeight;
for (int as = ac; as < ae; ++as)
{
- pat.items.append(doc->Items->takeAt(ac));
+ PageItem* paItem = doc->Items->takeAt(ac);
+ paItem->setItemName(patternName+QString("_%1").arg(as-ac));
+ pat.items.append(paItem);
}
doc->addPattern(patternName, pat);
propertiesPalette->updateColorList();
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp (revision 13931)
+++ scribus/pslib.cpp (revision 13932)
@@ -450,6 +450,8 @@
PutStream(Fonts);
if (GraySc)
PutStream(GrayCalc);
+ Optimization optim = optimization;
+ optimization = OptimizeSize;
QStringList patterns = m_Doc->getUsedPatterns();
for (int c = 0; c < patterns.count(); ++c)
{
@@ -566,6 +568,7 @@
PutStream("} def\n");
PutStream("end\n");
}
+ optimization = optim;
// PutStream("end\n");
// PutStream("%%EndSetup\n");
Prolog = "";
@@ -1421,11 +1424,14 @@
}
image.applyEffect(c->effectsInUse, colorsToUse, true);
QByteArray maskArray;
- bool alphaLoaded = image.getAlpha(fn, c->pixm.imgInfo.actualPageNumber, maskArray, false, true, 300);
- if (!alphaLoaded)
+ if (c->pixm.imgInfo.type != ImageType7)
{
- PS_Error_MaskLoadFailure(fn);
- return false;
+ bool alphaLoaded = image.getAlpha(fn, c->pixm.imgInfo.actualPageNumber, maskArray, false, true, 300);
+ if (!alphaLoaded)
+ {
+ PS_Error_MaskLoadFailure(fn);
+ return false;
+ }
}
if ((maskArray.size() > 0) && (c->pixm.imgInfo.type != ImageType7))
{
More information about the scribus-commit
mailing list