r14212 by fschmid - Fixed several issues with the new stroke modes.

scribus-commit scribus-commit at lists.scribus.net
Thu Oct 22 11:25:38 CEST 2009


Revision: 14212
Author: fschmid
Date: 2009-10-22T06:26:40.844485Z
Commit message: Fixed several issues with the new stroke modes.

Changeset: 
M  /trunk/Scribus/scribus/ui/propertiespalette.cpp
M  /trunk/Scribus/scribus/scribus.cpp
M  /trunk/Scribus/scribus/pageitem.cpp
M  /trunk/Scribus/scribus/ui/propertiespalette.h
M  /trunk/Scribus/scribus/ui/cpalette.cpp
M  /trunk/Scribus/scribus/scribus.h
M  /trunk/Scribus/scribus/ui/cpalette.h

Diffs:
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp	(revision 14211)
+++ scribus/pageitem.cpp	(revision 14212)
@@ -1245,6 +1245,7 @@
 						{
 							p->setPattern(&m_Doc->docPatterns[patternStrokeVal], patternStrokeScaleX, patternStrokeScaleY, patternStrokeOffsetX, patternStrokeOffsetY, patternStrokeRotation);
 							p->setStrokeMode(ScPainter::Pattern);
+							p->strokePath();
 						}
 						else if (GrTypeStroke > 0)
 						{
@@ -1277,6 +1278,7 @@
 									p->setGradient(VGradient::radial, gra.point(0), gra.point(1), gra.point(0));
 								}
 							}
+							p->strokePath();
 						}
 						else if (lineColor() != CommonStrings::None)
 						{
@@ -1284,8 +1286,8 @@
 							p->setPen(strokeQColor, m_lineWidth, PLineArt, PLineEnd, PLineJoin);
 							if (DashValues.count() != 0)
 								p->setDash(DashValues, DashOffset);
+							p->strokePath();
 						}
-						p->strokePath();
 					}
 					else
 					{
@@ -5153,6 +5155,7 @@
 			{
 				p->setPattern(&m_Doc->docPatterns[patternStrokeVal], patternStrokeScaleX, patternStrokeScaleY, patternStrokeOffsetX, patternStrokeOffsetY, patternStrokeRotation);
 				p->setFillMode(ScPainter::Pattern);
+				p->fillPath();
 			}
 			else if (GrTypeStroke > 0)
 			{
@@ -5187,6 +5190,7 @@
 						p->setGradient(VGradient::radial, gra.point(0), gra.point(1), gra.point(0));
 					}
 				}
+				p->fillPath();
 			}
 			else if (lineColor() != CommonStrings::None)
 			{
@@ -5194,8 +5198,8 @@
 				p->setBrushOpacity(1.0 - lineTransparency());
 				p->setLineWidth(0);
 				p->setFillMode(ScPainter::Solid);
+				p->fillPath();
 			}
-			p->fillPath();
 		}
 		else
 		{
Index: scribus/ui/cpalette.cpp
===================================================================
--- scribus/ui/cpalette.cpp	(revision 14211)
+++ scribus/ui/cpalette.cpp	(revision 14212)
@@ -325,6 +325,7 @@
 	connect(editPatternPropsStroke, SIGNAL(clicked()), this, SLOT(changePatternPropsStroke()));
 	connect(namedGradientStroke, SIGNAL(activated(const QString &)), this, SLOT(setNamedGradientStroke(const QString &)));
 	connect(gradientTypeStroke, SIGNAL(activated(int)), this, SLOT(slotGradTypeStroke(int)));
+	connect(gradEditStroke, SIGNAL(gradientChanged()), this, SIGNAL(strokeGradientChanged()));
 	connect(gradEditButtonStroke, SIGNAL(clicked()), this, SLOT(editGradientVectorStroke()));
 	editFillColorSelector->setChecked(true);
 	editFillColorSelectorButton();
@@ -764,13 +765,13 @@
 	}
 	else if (number == 2)
 	{
-		emit NewGradient(0);
+		emit NewGradientS(0);
 		if (patternBoxStroke->currentItem())
 			emit NewPatternS(patternBoxStroke->currentItem()->text());
 	}
 	else
 	{
-		emit NewGradient(0);
+		emit NewGradientS(0);
 		emit NewPatternS("");
 	}
 }
Index: scribus/ui/cpalette.h
===================================================================
--- scribus/ui/cpalette.h	(revision 14211)
+++ scribus/ui/cpalette.h	(revision 14212)
@@ -188,6 +188,7 @@
 	void NewBlendS(int);
 	void NewOverprint(int);
 	void gradientChanged();
+	void strokeGradientChanged();
 	void editGradient(bool);
 
 protected:
Index: scribus/ui/propertiespalette.h
===================================================================
--- scribus/ui/propertiespalette.h	(revision 14211)
+++ scribus/ui/propertiespalette.h	(revision 14212)
@@ -139,6 +139,7 @@
 	
 	void updateColorSpecialGradient();
 	const VGradient getFillGradient();
+	const VGradient getStrokeGradient();
 	void updateColorList();
 	void setGradientEditMode(bool);
 	void updateCmsList();
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp	(revision 14211)
+++ scribus/ui/propertiespalette.cpp	(revision 14212)
@@ -1668,6 +1668,7 @@
 //CB unused in 135 	connect(this->Cpal, SIGNAL(modeChanged()), m_ScMW, SLOT(setCSMenu()));
 //	connect(this->Cpal->gradEdit->Preview, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
 	connect(this->Cpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
+	connect(this->Cpal, SIGNAL(strokeGradientChanged()), m_ScMW, SLOT(updtGradStroke()));
 	connect(DoUnGroup, SIGNAL(clicked()), m_ScMW, SLOT(UnGroupObj()) );
 	
 }
@@ -5599,6 +5600,11 @@
 	return Cpal->gradEdit->gradient();
 }
 
+const VGradient PropertiesPalette::getStrokeGradient()
+{
+	return Cpal->gradEditStroke->gradient();
+}
+
 void PropertiesPalette::setGradientEditMode(bool on)
 {
 	Cpal->gradEditButton->setChecked(on);
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 14211)
+++ scribus/scribus.cpp	(revision 14212)
@@ -7404,6 +7404,14 @@
 	VGradient vg(propertiesPalette->getFillGradient());
 	doc->itemSelection_SetFillGradient(vg);
 }
+
+void ScribusMainWindow::updtGradStroke()
+{
+	if (!HaveDoc)
+		return;
+	VGradient vg(propertiesPalette->getStrokeGradient());
+	doc->itemSelection_SetLineGradient(vg);
+}
 /*
 //CB-->Doc
 void ScribusMainWindow::GetBrushPen()
Index: scribus/scribus.h
===================================================================
--- scribus/scribus.h	(revision 14211)
+++ scribus/scribus.h	(revision 14212)
@@ -452,6 +452,7 @@
 	void setGradFill(int typ);
 	*/
 	void updtGradFill();
+	void updtGradStroke();
 	/*
 	// Setzt die Pen-Farbe
 	void setPenFarbe(QString farbe);




More information about the scribus-commit mailing list