r22976 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon May 6 11:00:58 UTC 2019


Author: jghali
Date: Mon May  6 11:00:58 2019
New Revision: 22976

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22976
Log:
#15675: Wrong color used on svg import

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=22976&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  6 11:00:58 2019
@@ -2480,6 +2480,7 @@
 		else if (params == "none")
 		{
 			obj->FillCol = CommonStrings::None;
+			obj->FillGradientType = 0;
 		}
 		else if (params.startsWith( "url(" ))
 		{
@@ -2569,7 +2570,10 @@
 			obj->FillCol = CommonStrings::None;
 		}
 		else
+		{
 			obj->FillCol = parseColor(params);
+			obj->FillGradientType = 0;
+		}
 	}
 	else if (command == "fill-rule")
 	{
@@ -2594,6 +2598,7 @@
 		else if (params == "none")
 		{
 			obj->StrokeCol = CommonStrings::None;
+			obj->StrokeGradientType = 0;
 		}
 		else if (params.startsWith( "url(" ) )
 		{
@@ -2683,24 +2688,10 @@
 			obj->StrokeCol = CommonStrings::None;
 		}
 		else
+		{
 			obj->StrokeCol = parseColor(params);
-		/*		if (params == "none")
-					gc->stroke.setType(VStroke::none);
-				else if (params.startsWith( "url(" ))
-				{
-					unsigned int start = params.find("#") + 1;
-					unsigned int end = params.lastIndexOf(")");
-					QString key = params.mid(start, end - start);
-					gc->stroke.gradient() = m_gradients[ key ].gradient;
-					gc->stroke.gradient().transform(m_gradients[ key ].gradientTransform);
-					gc->stroke.gradient().transform(gc->matrix);
-					gc->stroke.setType(VStroke::grad);
-				}
-				else
-				{
-					parseColor(strokecolor, params);
-					gc->stroke.setType(VStroke::solid);
-				} */
+			obj->StrokeGradientType = 0;
+		}
 	}
 	else if (command == "stroke-width")
 		obj->LWidth = parseUnit(params);




More information about the scribus-commit mailing list