r19483 by fschmid - Fixed Bug #12649: Importing EPS problem (attachment included)
scribus-commit
scribus-commit at lists.scribus.net
Sat Sep 6 09:29:49 UTC 2014
Author: fschmid
Date: Sat Sep 6 09:29:49 2014
New Revision: 19483
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19483
Log:
Fixed Bug #12649: Importing EPS problem (attachment included)
Modified:
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19483&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Sat Sep 6 09:29:49 2014
@@ -1689,6 +1689,8 @@
{
if (!m_Doc->DoDrawing)
return;
+ if (PoLine.isEmpty())
+ return;
if (cullingArea.isNull())
{
cullingArea = QRectF(QPointF(m_Doc->minCanvasCoordinate.x(), m_Doc->minCanvasCoordinate.y()),
Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19483&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 Sat Sep 6 09:29:49 2014
@@ -1280,7 +1280,19 @@
m_Elements->removeAll(gElements.Items.at(d));
}
PageItem *sing = gElements.Items.first();
+ QPainterPath input1 = sing->PoLine.toQPainterPath(true);
+ if (sing->fillEvenOdd())
+ input1.setFillRule(Qt::OddEvenFill);
+ else
+ input1.setFillRule(Qt::WindingFill);
+ QPainterPath input2 = ite->PoLine.toQPainterPath(true);
+ if (ite->fillEvenOdd())
+ input2.setFillRule(Qt::OddEvenFill);
+ else
+ input2.setFillRule(Qt::WindingFill);
+ QPainterPath result = input1.intersected(input2);
if ((gElements.Items.count() == 1)
+ && (sing->isGroup() && !result.isEmpty())
&& (sing->isImageFrame() || sing->isGroup() || sing->isPolygon() || sing->isPolyLine())
&& (ite->patternMask().isEmpty() || sing->patternMask().isEmpty() || (sing->patternMask() == ite->patternMask()))
&& (state->getFillOpacity() == (1.0 - ite->fillTransparency()))
@@ -1313,31 +1325,16 @@
allItems[si]->moveBy(dx, dy, true);
}
}
- QPainterPath input1 = sing->PoLine.toQPainterPath(true);
- if (sing->fillEvenOdd())
- input1.setFillRule(Qt::OddEvenFill);
- else
- input1.setFillRule(Qt::WindingFill);
- QPainterPath input2 = ite->PoLine.toQPainterPath(true);
- if (ite->fillEvenOdd())
- input2.setFillRule(Qt::OddEvenFill);
- else
- input2.setFillRule(Qt::WindingFill);
- QPainterPath result = input1.intersected(input2);
sing->setXYPos(ite->xPos(), ite->yPos(), true);
sing->setWidthHeight(ite->width(), ite->height(), true);
sing->groupWidth = ite->width();
sing->groupHeight = ite->height();
- /* if (sing->isImageFrame())
- {
- QTransform ft;
- ft.translate(-result.boundingRect().x(), -result.boundingRect().y());
- ft.scale(ite->width() / result.boundingRect().width(), ite->height() / result.boundingRect().height());
- result = ft.map(result);
- }*/
sing->ClipEdited = true;
sing->FrameType = 3;
- sing->PoLine.fromQPainterPath(result);
+ if (!result.isEmpty())
+ sing->PoLine.fromQPainterPath(result);
+ else
+ sing->SetRectFrame();
m_doc->AdjustItemSize(sing);
if (sing->isGroup())
sing->asGroupFrame()->adjustXYPosition();
More information about the scribus-commit
mailing list