r14108 by jghali - #8033: copy item properties does not work with gradients

scribus-commit scribus-commit at lists.scribus.net
Wed Oct 7 01:00:15 CEST 2009


Revision: 14108
Author: jghali
Date: 2009-10-06T22:39:41.553324Z
Commit message: #8033: copy item properties does not work with gradients

Changeset: 
M  /branches/Version135/Scribus/scribus/canvasmode_copyproperties.cpp

Diffs:
Index: scribus/canvasmode_copyproperties.cpp
===================================================================
--- scribus/canvasmode_copyproperties.cpp	(revision 14107)
+++ scribus/canvasmode_copyproperties.cpp	(revision 14108)
@@ -155,6 +155,7 @@
 	SeleItem(m);
 	if (GetItem(&currItem))
 	{
+		double sx, sy, ex, ey, r;
 		currItem->ColGap = m_doc->ElemToLink->ColGap;
 		currItem->Cols = m_doc->ElemToLink->Cols;
 		currItem->BottomLine = m_doc->ElemToLink->BottomLine;
@@ -162,6 +163,7 @@
 		currItem->LeftLine = m_doc->ElemToLink->LeftLine;
 		currItem->RightLine = m_doc->ElemToLink->RightLine;
 		currItem->setTextToFrameDist(m_doc->ElemToLink->textToFrameDistLeft(), m_doc->ElemToLink->textToFrameDistRight(), m_doc->ElemToLink->textToFrameDistTop(), m_doc->ElemToLink->textToFrameDistBottom());
+		// Stroke Properties
 		currItem->setLineStyle(m_doc->ElemToLink->lineStyle());
 		currItem->setLineWidth(m_doc->ElemToLink->lineWidth());
 		currItem->setLineTransparency(m_doc->ElemToLink->lineTransparency());
@@ -172,9 +174,21 @@
 		currItem->setCustomLineStyle(m_doc->ElemToLink->customLineStyle());
 		currItem->setEndArrowIndex(m_doc->ElemToLink->endArrowIndex());
 		currItem->setStartArrowIndex(m_doc->ElemToLink->startArrowIndex());
+		// Fill Properties
 		currItem->setFillColor(m_doc->ElemToLink->fillColor());
 		currItem->setFillShade(m_doc->ElemToLink->fillShade());
 		currItem->setFillTransparency(m_doc->ElemToLink->fillTransparency());
+		// Gradient Properties
+		currItem->fill_gradient = m_doc->ElemToLink->fill_gradient;
+		m_doc->ElemToLink->gradientVector(sx, sy, ex, ey);
+		currItem->setGradientVector(sx, sy, ex, ey);
+		// Pattern Properties
+		currItem->setPattern(m_doc->ElemToLink->pattern());
+		m_doc->ElemToLink->patternTransform(sx, sy, ex, ey, r);
+		currItem->setPatternTransform(sx, sy, ex, ey, r);
+		// Set Gradient type after all properties
+		currItem->setGradientType(m_doc->ElemToLink->gradientType());
+		// Update Item
 		m_doc->ElemToLink = currItem;
 		currItem->update();
 //		emit DocChanged();




More information about the scribus-commit mailing list