r14174 by fschmid - Some fixes for the recent addition of stroke patterns + one fix for Jean's colormanagement work.
scribus-commit
scribus-commit at lists.scribus.net
Sun Oct 18 19:10:57 CEST 2009
Revision: 14174
Author: fschmid
Date: 2009-10-18T14:50:36.815909Z
Commit message: Some fixes for the recent addition of stroke patterns + one fix for Jean's colormanagement work.
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/pdfopts.cpp
M /trunk/Scribus/scribus/ui/hruler.cpp
M /trunk/Scribus/scribus/colormngt/sccolormngtenginedata.h
M /trunk/Scribus/scribus/canvasmode_copyproperties.cpp
Diffs:
Index: scribus/colormngt/sccolormngtenginedata.h
===================================================================
--- scribus/colormngt/sccolormngtenginedata.h (revision 14173)
+++ scribus/colormngt/sccolormngtenginedata.h (revision 14174)
@@ -28,8 +28,8 @@
public:
- ScColorMngtEngineData(const QString& desc, int uniqueID) : m_description(desc),
- m_engineID(uniqueID),
+ ScColorMngtEngineData(const QString& desc, int uniqueID) : m_engineID(uniqueID),
+ m_description(desc),
m_transformPool(uniqueID)
{}
Index: scribus/canvasmode_copyproperties.cpp
===================================================================
--- scribus/canvasmode_copyproperties.cpp (revision 14173)
+++ scribus/canvasmode_copyproperties.cpp (revision 14174)
@@ -180,14 +180,24 @@
currItem->setFillTransparency(m_doc->ElemToLink->fillTransparency());
// Gradient Properties
currItem->fill_gradient = m_doc->ElemToLink->fill_gradient;
+ currItem->setGradient(m_doc->ElemToLink->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);
+ currItem->setStrokePattern(m_doc->ElemToLink->strokePattern());
+ m_doc->ElemToLink->strokePatternTransform(sx, sy, ex, ey, r);
+ currItem->setStrokePatternTransform(sx, sy, ex, ey, r);
// Set Gradient type after all properties
currItem->setGradientType(m_doc->ElemToLink->gradientType());
+
+ currItem->stroke_gradient = m_doc->ElemToLink->stroke_gradient;
+ currItem->setStrokeGradient(m_doc->ElemToLink->strokeGradient());
+ m_doc->ElemToLink->strokeGradientVector(sx, sy, ex, ey);
+ currItem->setStrokeGradientVector(sx, sy, ex, ey);
+ currItem->setStrokeGradientType(m_doc->ElemToLink->strokeGradientType());
// Update Item
m_doc->ElemToLink = currItem;
currItem->update();
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp (revision 14173)
+++ scribus/pageitem.cpp (revision 14174)
@@ -4591,7 +4591,7 @@
double extraSpace = 0.0;
if (NamedLStyle.isEmpty())
{
- if (lineColor() != CommonStrings::None)
+ if ((lineColor() != CommonStrings::None) || (!patternStrokeVal.isEmpty()))
extraSpace = m_lineWidth / 2.0;
}
else
@@ -4742,7 +4742,7 @@
double extraSpace = 0.0;
if (NamedLStyle.isEmpty())
{
- if (lineColor() != CommonStrings::None)
+ if ((lineColor() != CommonStrings::None) || (!patternStrokeVal.isEmpty()))
extraSpace = m_lineWidth / 2.0;
}
else
@@ -4760,7 +4760,7 @@
double extraSpace = 0.0;
if (NamedLStyle.isEmpty())
{
- if (lineColor() != CommonStrings::None)
+ if ((lineColor() != CommonStrings::None) || (!patternStrokeVal.isEmpty()))
extraSpace = m_lineWidth / 2.0;
}
else
@@ -4778,7 +4778,7 @@
double extraSpace = 0.0;
if (NamedLStyle.isEmpty())
{
- if (lineColor() != CommonStrings::None)
+ if ((lineColor() != CommonStrings::None) || (!patternStrokeVal.isEmpty()))
extraSpace = m_lineWidth;
}
else
@@ -4796,7 +4796,7 @@
double extraSpace = 0.0;
if (NamedLStyle.isEmpty())
{
- if (lineColor() != CommonStrings::None)
+ if ((lineColor() != CommonStrings::None) || (!patternStrokeVal.isEmpty()))
extraSpace = m_lineWidth;
}
else
Index: scribus/ui/pdfopts.cpp
===================================================================
--- scribus/ui/pdfopts.cpp (revision 14173)
+++ scribus/ui/pdfopts.cpp (revision 14174)
@@ -15,7 +15,6 @@
#include "scconfig.h"
#include "pdfopts.h"
-#include "colormngt/sccolormngtengine.h"
#include "commonstrings.h"
#include "pdfoptions.h"
#include "prefsfile.h"
Index: scribus/ui/hruler.cpp
===================================================================
--- scribus/ui/hruler.cpp (revision 14173)
+++ scribus/ui/hruler.cpp (revision 14174)
@@ -825,7 +825,7 @@
ItemEndPos -= currDoc->currentPage()->xOffset();
}
- if (item->lineColor() != CommonStrings::None)
+ if ((item->lineColor() != CommonStrings::None) || (!item->strokePattern().isEmpty()))
lineCorr = item->lineWidth() / 2.0;
else
lineCorr = 0;
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp (revision 14173)
+++ scribus/ui/propertiespalette.cpp (revision 14174)
@@ -3868,7 +3868,7 @@
else
{
double lineCorr;
- if (CurItem->lineColor() != CommonStrings::None)
+ if ((CurItem->lineColor() != CommonStrings::None) || (!CurItem->strokePattern().isEmpty()))
lineCorr = CurItem->lineWidth();
else
lineCorr = 0;
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp (revision 14173)
+++ scribus/scribus.cpp (revision 14174)
@@ -3077,7 +3077,7 @@
if (currItem->asTextFrame())
enableTextActions(&scrActions, true, currItem->currentStyle().charStyle().font().scName());
view->horizRuler->setItem(currItem);
- if (currItem->lineColor() != CommonStrings::None)
+ if ((currItem->lineColor() != CommonStrings::None) || (!currItem->strokePattern().isEmpty()))
view->horizRuler->lineCorr = currItem->lineWidth() / 2.0;
else
view->horizRuler->lineCorr = 0;
More information about the scribus-commit
mailing list