r19428 by fschmid - Additional fix for Bug #12280: Malfunctioning gradient treatment

scribus-commit scribus-commit at lists.scribus.net
Fri Aug 15 08:39:56 UTC 2014


Author: fschmid
Date: Fri Aug 15 08:39:55 2014
New Revision: 19428

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19428
Log:
Additional fix for Bug #12280: Malfunctioning gradient treatment
Fixed PDF Export

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pdflib_core.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19428&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Fri Aug 15 08:39:55 2014
@@ -3025,7 +3025,7 @@
 		setGradientColor1(tmp);
 	}
 	else
-		setGradientColor1(QColor(255, 255, 255, 0));
+		setGradientColor1(QColor(0, 0, 0, 0));
 	if (m_Doc->viewAsPreview)
 	{
 		VisionDefectColor defect;
@@ -3064,7 +3064,7 @@
 		setGradientColor2(tmp);
 	}
 	else
-		setGradientColor2(QColor(255, 255, 255, 0));
+		setGradientColor2(QColor(0, 0, 0, 0));
 	if (m_Doc->viewAsPreview)
 	{
 		VisionDefectColor defect;
@@ -3103,7 +3103,7 @@
 		setGradientColor3(tmp);
 	}
 	else
-		setGradientColor3(QColor(255, 255, 255, 0));
+		setGradientColor3(QColor(0, 0, 0, 0));
 	if (m_Doc->viewAsPreview)
 	{
 		VisionDefectColor defect;
@@ -3142,7 +3142,7 @@
 		setGradientColor4(tmp);
 	}
 	else
-		setGradientColor4(QColor(255, 255, 255, 0));
+		setGradientColor4(QColor(0, 0, 0, 0));
 	if (m_Doc->viewAsPreview)
 	{
 		VisionDefectColor defect;
@@ -3211,7 +3211,7 @@
 		MQColor.setAlphaF(transparency);
 	}
 	else
-		MQColor = QColor(255, 255, 255, 0);
+		MQColor = QColor(0, 0, 0, 0);
 	if (m_Doc->viewAsPreview)
 	{
 		VisionDefectColor defect;
@@ -3429,7 +3429,7 @@
 		MQColor.setAlphaF(1.0);
 	}
 	else
-		MQColor = QColor(255, 255, 255, 0);
+		MQColor = QColor(0, 0, 0, 0);
 	if (m_Doc->viewAsPreview)
 	{
 		VisionDefectColor defect;

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19428&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Fri Aug 15 08:39:55 2014
@@ -5884,13 +5884,13 @@
 		if (Options.isGrayscale)
 			tmp = "0.0";
 		if (Options.UseRGB)
-			tmp = "1.0 1.0 1.0";
+			tmp = "0.0 0.0 0.0";
 		else
 		{
 			if ((doc.HasCMS) && (Options.UseProfiles))
 			{
 				if (Options.SComp == 3)
-					tmp = "1.0 1.0 1.0";
+					tmp = "0.0 0.0 0.0";
 				else
 					tmp = "0.0 0.0 0.0 0.0";
 			}
@@ -8249,14 +8249,20 @@
 			StopVec.append(0.0);
 			colorNames.append(cstops.at(cst)->name);
 			colorShades.append(cstops.at(cst)->shade);
-			TransVec.append(cstops.at(cst)->opacity);
+			if (cstops.at(cst)->name == CommonStrings::None)
+				TransVec.append(0);
+			else
+				TransVec.append(cstops.at(cst)->opacity);
 			Gcolors.append(SetGradientColor(cstops.at(cst)->name, cstops.at(cst)->shade));
 		}
 		isFirst = false;
 		StopVec.append(actualStop);
 		colorNames.append(cstops.at(cst)->name);
 		colorShades.append(cstops.at(cst)->shade);
-		TransVec.append(cstops.at(cst)->opacity);
+		if (cstops.at(cst)->name == CommonStrings::None)
+			TransVec.append(0);
+		else
+			TransVec.append(cstops.at(cst)->opacity);
 		if (cstops.at(cst)->opacity != 1.0)
 			transparencyFound = true;
 		if (spotMap.contains(cstops.at(cst)->name))
@@ -8270,7 +8276,10 @@
 			StopVec.append(1.0);
 			colorNames.append(cstops.at(cst)->name);
 			colorShades.append(cstops.at(cst)->shade);
-			TransVec.append(cstops.at(cst)->opacity);
+			if (cstops.at(cst)->name == CommonStrings::None)
+				TransVec.append(0);
+			else
+				TransVec.append(cstops.at(cst)->opacity);
 			Gcolors.append(SetGradientColor(cstops.at(cst)->name, cstops.at(cst)->shade));
 		}
 		lastStop = actualStop;




More information about the scribus-commit mailing list