r23115 by jghali - #15759: Gradient in imported SVG file disappears after resizing and leaves the result unsusable
scribus-commit
scribus-commit at lists.scribus.net
Wed Aug 7 04:37:42 UTC 2019
Author: jghali
Date: Wed Aug 7 04:37:42 2019
New Revision: 23115
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23115
Log:
#15759: Gradient in imported SVG file disappears after resizing and leaves the result unsusable
Modified:
trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23115&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 7 04:37:42 2019
@@ -1322,6 +1322,8 @@
neu->PoLine.translate(-gx + baseX, -gy + baseY);
clipPath.resize(0);
neu->Clip = flattenPath(neu->PoLine, neu->Segments);
+ neu->ClipEdited = true;
+ neu->FrameType = 3;
}
else
neu->SetRectFrame();
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23115&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Aug 7 04:37:42 2019
@@ -14345,9 +14345,9 @@
else
moveItem(tp2.x(), tp2.y(), currItem);
if (!currItem->imageFlippedH())
- currItem->moveImageInFrame(-tp2.x()/currItem->imageXScale(), 0);
+ currItem->moveImageInFrame(-tp2.x() / currItem->imageXScale(), 0);
if (!currItem->imageFlippedV())
- currItem->moveImageInFrame(0, -tp2.y()/currItem->imageYScale());
+ currItem->moveImageInFrame(0, -tp2.y() / currItem->imageYScale());
FPoint tp(clipRect.width(), clipRect.height());
if (currItem->imageFlippedH())
currItem->moveImageInFrame((currItem->width() - tp.x())/currItem->imageXScale(), 0);
@@ -14359,8 +14359,9 @@
{
currItem->groupWidth = oldgW * (currItem->width() / oldW);
currItem->groupHeight = oldgH * (currItem->height() / oldH);
- double dx = (currItem->xPos() - oldX) / (currItem->width() / currItem->groupWidth);
- double dy = (currItem->yPos() - oldY) / (currItem->height() / currItem->groupHeight);
+ // #15759: the division by item dimension looks incorrect
+ double dx = (currItem->xPos() - oldX) / (/*currItem->width() /*/ currItem->groupWidth);
+ double dy = (currItem->yPos() - oldY) / (/*currItem->height() /*/ currItem->groupHeight);
for (int em = 0; em < currItem->groupItemList.count(); ++em)
{
PageItem* embedded = currItem->groupItemList.at(em);
@@ -14633,11 +14634,13 @@
}
if (item->isGroup() || item->isSymbol())
{
- double oldGW = item->groupWidth;
- double oldGH = item->groupHeight;
+ // #15759: save/restoring group dimensiosn looks unnecessary
+ // after fixing adjustItemSize() for groups
+ //double oldGW = item->groupWidth;
+ //double oldGH = item->groupHeight;
adjustItemSize(item, true, false);
- item->groupWidth = oldGW;
- item->groupHeight = oldGH;
+ //item->groupWidth = oldGW;
+ //item->groupHeight = oldGH;
}
else
adjustItemSize(item, true, false);
More information about the scribus-commit
mailing list