r17521 by fschmid - Fixed Bug 10708: respect linewidth correctly

scribus-commit scribus-commit at lists.scribus.net
Mon May 28 10:02:19 UTC 2012


Author: fschmid
Date: Mon May 28 10:02:18 2012
New Revision: 17521

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17521
Log:
Fixed Bug 10708: respect linewidth correctly

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=17521&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 Mon May 28 10:02:18 2012
@@ -847,14 +847,13 @@
 					double bX = item->xPos() + End.x();
 					double bY = item->yPos() + End.y();
 					ScPattern pat = m_Doc->docPatterns[gc->endMarker];
-					markerDesc mark = markers[gc->endMarker];
-					double dX = (mark.wpat * pat.width) / 2.0;
-					double dY = (mark.hpat * pat.height) / 2.0;
+					double dX = (pat.width * item->lineWidth()) / 2.0;
+					double dY = (pat.height * item->lineWidth()) / 2.0;
 					arrowTrans.translate(bX, bY);
 					arrowTrans.rotate(r);
 					arrowTrans.translate(-dX, -dY);
 					FPoint ba = FPoint(0.0, 0.0).transformPoint(arrowTrans, false);
-					int z = m_Doc->itemAdd(PageItem::Symbol, PageItem::Unspecified, ba.x(), ba.y(), mark.wpat * pat.width, mark.hpat * pat.height, 0, CommonStrings::None, CommonStrings::None, true);
+					int z = m_Doc->itemAdd(PageItem::Symbol, PageItem::Unspecified, ba.x(), ba.y(), dX * 2.0, dY * 2.0, 0, CommonStrings::None, CommonStrings::None, true);
 					PageItem* ite = m_Doc->Items->at(z);
 					ite->setPattern(importedPattTrans[gc->endMarker]);
 					ite->setRotation(r, true);
@@ -879,14 +878,13 @@
 					double bX = item->xPos() + End.x();
 					double bY = item->yPos() + End.y();
 					ScPattern pat = m_Doc->docPatterns[gc->startMarker];
-					markerDesc mark = markers[gc->startMarker];
-					double dX = (mark.wpat * pat.width) / 2.0;
-					double dY = (mark.hpat * pat.height) / 2.0;
+					double dX = (pat.width * item->lineWidth()) / 2.0;
+					double dY = (pat.height * item->lineWidth()) / 2.0;
 					arrowTrans.translate(bX, bY);
 					arrowTrans.rotate(r);
 					arrowTrans.translate(-dX, -dY);
 					FPoint ba = FPoint(0.0, 0.0).transformPoint(arrowTrans, false);
-					int z = m_Doc->itemAdd(PageItem::Symbol, PageItem::Unspecified, ba.x(), ba.y(), mark.wpat * pat.width, mark.hpat * pat.height, 0, CommonStrings::None, CommonStrings::None, true);
+					int z = m_Doc->itemAdd(PageItem::Symbol, PageItem::Unspecified, ba.x(), ba.y(), dX * 2.0, dY * 2.0, 0, CommonStrings::None, CommonStrings::None, true);
 					PageItem* ite = m_Doc->Items->at(z);
 					ite->setPattern(importedPattTrans[gc->startMarker]);
 					ite->setRotation(r, true);




More information about the scribus-commit mailing list