r22641 by jghali - #15409: embedded image positioned incorrectly in imported svg
scribus-commit
scribus-commit at lists.scribus.net
Wed Aug 22 14:33:44 UTC 2018
Author: jghali
Date: Wed Aug 22 14:33:44 2018
New Revision: 22641
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22641
Log:
#15409: embedded image positioned incorrectly in imported svg
Modified:
trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22641&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 Aug 22 14:33:44 2018
@@ -616,6 +616,7 @@
FPoint wh = getMaxClipF(&item->PoLine);
item->setWidthHeight(wh.x(), wh.y());
m_Doc->adjustItemSize(item);
+ item->ContourLine = item->PoLine.copy();
// item->moveBy(mm.dx(), mm.dy());
// item->setWidthHeight(item->width() * mm.m11(), item->height() * mm.m22());
// item->setLineWidth(item->lineWidth() * (coeff1 + coeff2) / 2.0);
@@ -1581,7 +1582,7 @@
double h = e.attribute( "height" ).isEmpty() ? 1.0 : parseUnit( e.attribute( "height" ) );
setupNode(e);
parseClipPathAttr(e, clipPath);
- int z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, x+BaseX, y+BaseY, w, h, 1, m_Doc->itemToolPrefs().imageFillColor, m_Doc->itemToolPrefs().imageStrokeColor);
+ int z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, BaseX, BaseY, w, h, 1, m_Doc->itemToolPrefs().imageFillColor, m_Doc->itemToolPrefs().imageStrokeColor);
PageItem* ite = m_Doc->Items->at(z);
if (!fname.isEmpty())
{
@@ -1613,6 +1614,7 @@
if (!clipPath.empty())
ite->PoLine = clipPath.copy();
clipPath.resize(0);
+ ite->PoLine.map( QTransform(1.0, 0.0, 0.0, 1.0, x, y) );
ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
finishNode(e, ite);
IElements.append(ite);
More information about the scribus-commit
mailing list