Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 11332 → Rev 11333

/trunk/Scribus/scribus/pdflib_core.h
82,9 → 82,9
QString SetClipPathArray(FPointArray *ite, bool poly = true);
QString SetClipPathImage(PageItem *ite);
QString SetClipPath(PageItem *ite, bool poly = true);
QString SetFarbeGrad(const QString& farbe, double Shade);
QString SetFarbe(const QString& farbe, double Shade);
QString SetFarbe(const ScColor& farbe, double Shade);
QString SetColor(const QString& farbe, double Shade);
QString SetColor(const ScColor& farbe, double Shade);
QString SetGradientColor(const QString& farbe, double Shade);
QString putColor(const QString& color, double Shade, bool fill);
QString putColorUncached(const QString& color, int Shade, bool fill);
QString Write_TransparencyGroup(double trans, int blend, QString &data);
/trunk/Scribus/scribus/pageitem_polyline.cpp
102,7 → 102,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
SetQColor(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(tmp, ml[it].Width, static_cast<Qt::PenStyle>(ml[it].Dash), static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
p->strokePath();
}
/trunk/Scribus/scribus/pageitem_pathtext.cpp
127,7 → 127,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
SetQColor(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(tmp, ml[it].Width, static_cast<Qt::PenStyle>(ml[it].Dash), static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
p->drawLine(FPoint(0, 0), FPoint(Width, 0));
}
310,7 → 310,7
{
if ((cachedFillShade != actFillShade) || (cachedFill != actFill))
{
SetFarbe(&tmp, actFill, actFillShade);
SetQColor(&tmp, actFill, actFillShade);
p->setBrush(tmp);
cachedFillQ = tmp;
cachedFill = actFill;
325,7 → 325,7
{
if ((cachedStrokeShade != actStrokeShade) || (cachedStroke != actStroke))
{
SetFarbe(&tmp, actStroke, actStrokeShade);
SetQColor(&tmp, actStroke, actStrokeShade);
p->setPen(tmp, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
cachedStrokeQ = tmp;
cachedStroke = actStroke;
/trunk/Scribus/scribus/pageitem.cpp
1107,7 → 1107,7
// Qt4 if ((!sl.Color != CommonStrings::None) && (sl.Width != 0))
if ((sl.Color != CommonStrings::None) && (sl.Width != 0))
{
SetFarbe(&tmp, sl.Color, sl.Shade);
SetQColor(&tmp, sl.Color, sl.Shade);
p->setPen(tmp, sl.Width, static_cast<Qt::PenStyle>(sl.Dash), static_cast<Qt::PenCapStyle>(sl.LineEnd), static_cast<Qt::PenJoinStyle>(sl.LineJoin));
p->strokePath();
}
1555,7 → 1555,7
return chstr;
}
 
void PageItem::SetFarbe(QColor *tmp, QString farbe, double shad)
void PageItem::SetQColor(QColor *tmp, QString farbe, double shad)
{
const ScColor& col = m_Doc->PageColors[farbe];
*tmp = ScColorEngine::getShadeColorProof(col, m_Doc, shad);
1970,7 → 1970,7
multiLine ml = m_Doc->MLineStyles[NamedLStyle];
for (int it = ml.size()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
SetQColor(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
qMax(static_cast<int>(ml[it].Width* view->scale()), 1),
static_cast<Qt::PenStyle>(ml[it].Dash),
1988,7 → 1988,7
multiLine ml = m_Doc->MLineStyles[NamedLStyle];
for (int it = ml.size()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
SetQColor(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
qMax(static_cast<int>(ml[it].Width* view->scale()), 1),
static_cast<Qt::PenStyle>(ml[it].Dash),
2007,7 → 2007,7
multiLine ml = m_Doc->MLineStyles[NamedLStyle];
for (int it = ml.size()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
SetQColor(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
qMax(static_cast<int>(ml[it].Width*view->scale()), 1),
static_cast<Qt::PenStyle>(ml[it].Dash),
/trunk/Scribus/scribus/scribusview.cpp
3657,19 → 3657,19
if (Buffer->GrType == 5)
{
if ((Buffer->GrColor != CommonStrings::None) && (!Buffer->GrColor.isEmpty()))
currItem->SetFarbe(&tmp, Buffer->GrColor, Buffer->GrShade);
currItem->SetQColor(&tmp, Buffer->GrColor, Buffer->GrShade);
currItem->fill_gradient.addStop(tmp, 0.0, 0.5, 1.0, Buffer->GrColor, Buffer->GrShade);
if ((Buffer->GrColor2 != CommonStrings::None) && (!Buffer->GrColor2.isEmpty()))
currItem->SetFarbe(&tmp, Buffer->GrColor2, Buffer->GrShade2);
currItem->SetQColor(&tmp, Buffer->GrColor2, Buffer->GrShade2);
currItem->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0, Buffer->GrColor2, Buffer->GrShade2);
}
else
{
if ((Buffer->GrColor2 != CommonStrings::None) && (!Buffer->GrColor2.isEmpty()))
currItem->SetFarbe(&tmp, Buffer->GrColor2, Buffer->GrShade2);
currItem->SetQColor(&tmp, Buffer->GrColor2, Buffer->GrShade2);
currItem->fill_gradient.addStop(tmp, 0.0, 0.5, 1.0, Buffer->GrColor2, Buffer->GrShade2);
if ((Buffer->GrColor != CommonStrings::None) && (!Buffer->GrColor.isEmpty()))
currItem->SetFarbe(&tmp, Buffer->GrColor, Buffer->GrShade);
currItem->SetQColor(&tmp, Buffer->GrColor, Buffer->GrShade);
currItem->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0, Buffer->GrColor, Buffer->GrShade);
}
}
/trunk/Scribus/scribus/pageitem_textframe.cpp
2325,7 → 2325,7
{
if ((cachedFillShade != actFillShade) || (cachedFill != actFill))
{
SetFarbe(&tmp, actFill, actFillShade);
SetQColor(&tmp, actFill, actFillShade);
p->setBrush(tmp);
cachedFillQ = tmp;
cachedFill = actFill;
2386,7 → 2386,7
{
if ((cachedStrokeShade != actStrokeShade) || (cachedStroke != actStroke))
{
SetFarbe(&tmp, actStroke, actStrokeShade);
SetQColor(&tmp, actStroke, actStrokeShade);
p->setPen(tmp, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
cachedStrokeQ = tmp;
cachedStroke = actStroke;
2463,7 → 2463,7
QColor tmp;
for (int it = ml.size()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
SetQColor(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(tmp, ml[it].Width,
static_cast<Qt::PenStyle>(ml[it].Dash),
static_cast<Qt::PenCapStyle>(ml[it].LineEnd),
/trunk/Scribus/scribus/pdflib_core.cpp
3631,7 → 3631,7
QString PDFLibCore::putColor(const QString& color, double shade, bool fill)
{
QString tmp = "";
QString colString = SetFarbe(color, shade);
QString colString = SetColor(color, shade);
ScColor tmpC;
tmpC = doc.PageColors[color];
if (((tmpC.isSpotColor()) || (tmpC.isRegistrationColor())) && ((Options.isGrayscale == false) && (Options.UseRGB == false)) && (Options.UseSpotColors))
3771,7 → 3771,7
}
return tmpSpot;
}
QString colString(SetFarbe(color, shade));
QString colString(SetColor(color, shade));
if (Options.isGrayscale)
{
QString tmpGray("");
4479,13 → 4479,13
#endif
}
 
QString PDFLibCore::SetFarbe(const QString& farbe, double Shade)
QString PDFLibCore::SetColor(const QString& farbe, double Shade)
{
const ScColor& col = doc.PageColors[farbe];
return SetFarbe(col, Shade);
return SetColor(col, Shade);
}
 
QString PDFLibCore::SetFarbe(const ScColor& farbe, double Shade)
QString PDFLibCore::SetColor(const ScColor& farbe, double Shade)
{
QString tmp;
RGBColor rgb;
4542,7 → 4542,7
return tmp;
}
 
QString PDFLibCore::SetFarbeGrad(const QString& farbe, double Shade)
QString PDFLibCore::SetGradientColor(const QString& farbe, double Shade)
{
QString tmp;
RGBColor rgb;
5015,7 → 5015,7
lastStop = actualStop;
TransVec.prepend(cstops.at(cst)->opacity);
StopVec.prepend(sqrt(pow(EndX - StartX, 2) + pow(EndY - StartY,2))*cstops.at(cst)->rampPoint);
Gcolors.prepend(SetFarbeGrad(cstops.at(cst)->name, cstops.at(cst)->shade));
Gcolors.prepend(SetGradientColor(cstops.at(cst)->name, cstops.at(cst)->shade));
colorNames.prepend(cstops.at(cst)->name);
colorShades.prepend(cstops.at(cst)->shade);
}
5035,7 → 5035,7
TransVec.append(cstops.at(cst)->opacity);
StopVec.append(x);
StopVec.append(y);
Gcolors.append(SetFarbeGrad(cstops.at(cst)->name, cstops.at(cst)->shade));
Gcolors.append(SetGradientColor(cstops.at(cst)->name, cstops.at(cst)->shade));
colorNames.append(cstops.at(cst)->name);
colorShades.append(cstops.at(cst)->shade);
}
5497,14 → 5497,14
{
PutDoc("/BG [ 1 1 1 ] ");
if (ite->annotation().borderColor() != CommonStrings::None)
PutDoc("/BC [ "+SetFarbe(ite->annotation().borderColor(), 100)+" ] ");
PutDoc("/BC [ "+SetColor(ite->annotation().borderColor(), 100)+" ] ");
}
else
{
if (ite->fillColor() != CommonStrings::None)
PutDoc("/BG [ "+SetFarbe(ite->fillColor(), ite->fillShade())+" ] ");
PutDoc("/BG [ "+SetColor(ite->fillColor(), ite->fillShade())+" ] ");
if (ite->annotation().borderColor() != CommonStrings::None)
PutDoc("/BC [ "+SetFarbe(ite->annotation().borderColor(), 100)+" ] ");
PutDoc("/BC [ "+SetColor(ite->annotation().borderColor(), 100)+" ] ");
}
int IconOb = 0;
switch (ite->annotation().Type())
/trunk/Scribus/scribus/pslib.h
115,8 → 115,8
virtual void putColor(const QString& color, double shade, bool fill);
virtual void SetClipPath(FPointArray *c, bool poly = true);
virtual void HandleGradient(PageItem *c, double w, double h, bool gcr);
virtual void SetFarbe(const QString& color, double shade, int *h, int *s, int *v, int *k, bool gcr);
virtual void SetFarbe(const ScColor& color, double shade, int *h, int *s, int *v, int *k, bool gcr);
virtual void SetColor(const QString& color, double shade, int *h, int *s, int *v, int *k, bool gcr);
virtual void SetColor(const ScColor& color, double shade, int *h, int *s, int *v, int *k, bool gcr);
virtual void setTextSt(ScribusDoc* Doc, PageItem* ite, bool gcr, uint a, Page* pg, bool sep, bool farb, bool ic, bool master);
virtual void setTextCh(ScribusDoc* Doc, PageItem* ite, double x, double y, bool gcr, uint a, uint d, ScText *hl, const ParagraphStyle& pstyle, Page* pg, bool sep, bool farb, bool ic, bool master);
bool Art;
/trunk/Scribus/scribus/pageitem_line.cpp
66,7 → 66,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
SetQColor(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(tmp, ml[it].Width, static_cast<Qt::PenStyle>(ml[it].Dash), static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
p->drawLine(FPoint(0, 0), FPoint(Width, 0));
}
/trunk/Scribus/scribus/scpreview.h
24,7 → 24,7
ScPreview();
~ScPreview() {};
QPixmap createPreview(QString data);
void SetFarbe(QColor *tmp, const QString& farbe, double shad);
void SetQColor(QColor *tmp, const QString& farbe, double shad);
void DrawZeichenS(ScPainter *p, double xco, double yco, QString ch, QString ZFo, bool Reverse, int Style, int mode, double Siz);
QMap<QString,ScColor> Farben;
QMap<QString,multiLine> MLineStyles;
/trunk/Scribus/scribus/scribusdoc.cpp
3212,7 → 3212,7
PageItem *ite = Items->at(c);
QList<VColorStop*> cstops = ite->fill_gradient.colorStops();
for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst)
ite->SetFarbe(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
ite->SetQColor(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
}
uint masterItemsCount=MasterItems.count();
for (uint c=0; c<masterItemsCount; ++c)
3220,7 → 3220,7
PageItem *ite = MasterItems.at(c);
QList<VColorStop*> cstops = ite->fill_gradient.colorStops();
for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst)
ite->SetFarbe(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
ite->SetQColor(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
}
uint frameItemsCount=FrameItems.count();
for (uint c=0; c<frameItemsCount; ++c)
3228,7 → 3228,7
PageItem *ite = FrameItems.at(c);
QList<VColorStop*> cstops = ite->fill_gradient.colorStops();
for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst)
ite->SetFarbe(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
ite->SetQColor(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
}
QStringList patterns = docPatterns.keys();
for (int c = 0; c < patterns.count(); ++c)
3239,7 → 3239,7
PageItem *ite = pa.items.at(o);
QList<VColorStop*> cstops = ite->fill_gradient.colorStops();
for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst)
ite->SetFarbe(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
ite->SetQColor(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
if (ite->asImageFrame())
loadPict(ite->Pfile, ite, true, false);
}
/trunk/Scribus/scribus/canvas.cpp
1194,7 → 1194,7
if ((currItem->lineColor() != CommonStrings::None) && (currItem->lineWidth() != 0.0))
{
QColor tmp;
currItem->SetFarbe(&tmp, currItem->lineColor(), currItem->lineShade());
currItem->SetQColor(&tmp, currItem->lineColor(), currItem->lineShade());
if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
{
painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
1392,7 → 1392,7
if ((currItem->lineColor() != CommonStrings::None) && (currItem->lineWidth() != 0.0))
{
QColor tmp;
currItem->SetFarbe(&tmp, currItem->lineColor(), currItem->lineShade());
currItem->SetQColor(&tmp, currItem->lineColor(), currItem->lineShade());
if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
{
painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
/trunk/Scribus/scribus/story.cpp
608,45 → 608,45
 
if (ch == SpecialChars::OBJECT)
{
setFarbe(true);
setColor(true);
insertPlainText("@");
setFarbe(false);
setColor(false);
}
else if (ch == SpecialChars::PAGENUMBER)
{
setFarbe(true);
setColor(true);
insertPlainText("#");
setFarbe(false);
setColor(false);
}
else if (ch == SpecialChars::NBSPACE)
{
setFarbe(true);
setColor(true);
insertPlainText("_");
setFarbe(false);
setColor(false);
}
else if (ch == SpecialChars::FRAMEBREAK)
{
setFarbe(true);
setColor(true);
insertPlainText("|");
setFarbe(false);
setColor(false);
}
else if (ch == SpecialChars::COLBREAK)
{
setFarbe(true);
setColor(true);
insertPlainText("^");
setFarbe(false);
setColor(false);
}
else if (ch == SpecialChars::NBHYPHEN)
{
setFarbe(true);
setColor(true);
insertPlainText("=");
setFarbe(false);
setColor(false);
}
else if (ch == SpecialChars::LINEBREAK)
{
setFarbe(true);
setColor(true);
insertPlainText("*");
setFarbe(false);
setColor(false);
}
else
Text += ch;
765,7 → 765,7
textCursor().setCharFormat(charF);
}
 
void SEditor::setFarbe(bool marker)
void SEditor::setColor(bool marker)
{
QColor tmp;
if (marker)
1324,7 → 1324,7
// disconnectSignals();
// connectSignals();
// Editor->setFocus();
// Editor->setFarbe(false);
// Editor->setColor(false);
// blockUpdate = false;
// loadPrefs();
// // hack to keep charPalette visible. See destructor too - PV
1355,7 → 1355,7
updateStatus();
*/
Editor->setFocus();
Editor->setFarbe(false);
Editor->setColor(false);
loadPrefs();
}
 
3103,10 → 3103,10
guiInsertString="=";
}
if (setColor)
Editor->setFarbe(true);
Editor->setColor(true);
Editor->insertPlainText(guiInsertString);
if (setColor)
Editor->setFarbe(false);
Editor->setColor(false);
modifiedText();
EditorBar->setRepaint(true);
EditorBar->doRepaint();
/trunk/Scribus/scribus/pageitem.h
315,7 → 315,7
const CharStyle& currentCharStyle() const;
// deprecated:
double layoutGlyphs(const CharStyle& style, const QString chars, GlyphLayout& layout);
void SetFarbe(QColor *tmp, QString farbe, double shad);
void SetQColor(QColor *tmp, QString farbe, double shad);
void drawGlyphs(ScPainter *p, const CharStyle& style, GlyphLayout& glyphs );
void DrawPolyL(QPainter *p, QPolygon pts);
QString ExpandToken(uint base);
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
96,7 → 96,7
{
if (col == cstops.at(cst)->name)
{
ite->SetFarbe(&tmpc, rep, cstops.at(cst)->shade);
ite->SetQColor(&tmpc, rep, cstops.at(cst)->shade);
cstops.at(cst)->color = tmpc;
cstops.at(cst)->name = rep;
}
125,7 → 125,7
{
if (col == cstops.at(cst)->name)
{
ite->SetFarbe(&tmpc, rep, cstops.at(cst)->shade);
ite->SetQColor(&tmpc, rep, cstops.at(cst)->shade);
cstops.at(cst)->color = tmpc;
cstops.at(cst)->name = rep;
}
/trunk/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp
25,9 → 25,9
currItem->fill_gradient.clearStops();
QString c1 = QString::fromUtf8(Color1);
QString c2 = QString::fromUtf8(Color2);
currItem->SetFarbe(&tmp, c1, shade1);
currItem->SetQColor(&tmp, c1, shade1);
currItem->fill_gradient.addStop(tmp, 0.0, 0.5, 1.0, c1, shade1);
currItem->SetFarbe(&tmp, c2, shade2);
currItem->SetQColor(&tmp, c2, shade2);
currItem->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0, c2, shade2);
currItem->GrType = typ;
switch (currItem->GrType)
/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
2425,11 → 2425,11
{
handleOldColorShade(doc, GrColor, GrShade);
if ((GrColor != CommonStrings::None) && (!GrColor.isEmpty()))
currItem->SetFarbe(&tmpc, GrColor, GrShade);
currItem->SetQColor(&tmpc, GrColor, GrShade);
currItem->fill_gradient.addStop(tmpc, 0.0, 0.5, 1.0, GrColor, GrShade);
handleOldColorShade(doc, GrColor2, GrShade2);
if ((GrColor2 != CommonStrings::None) && (!GrColor2.isEmpty()))
currItem->SetFarbe(&tmpc, GrColor2, GrShade2);
currItem->SetQColor(&tmpc, GrColor2, GrShade2);
currItem->fill_gradient.addStop(tmpc, 1.0, 0.5, 1.0, GrColor2, GrShade2);
}
else
2436,11 → 2436,11
{
handleOldColorShade(doc, GrColor2, GrShade2);
if ((GrColor2 != CommonStrings::None) && (!GrColor2.isEmpty()))
currItem->SetFarbe(&tmpc, GrColor2, GrShade2);
currItem->SetQColor(&tmpc, GrColor2, GrShade2);
currItem->fill_gradient.addStop(tmpc, 0.0, 0.5, 1.0, GrColor2, GrShade2);
handleOldColorShade(doc, GrColor, GrShade);
if ((GrColor != CommonStrings::None) && (!GrColor.isEmpty()))
currItem->SetFarbe(&tmpc, GrColor, GrShade);
currItem->SetQColor(&tmpc, GrColor, GrShade);
currItem->fill_gradient.addStop(tmpc, 1.0, 0.5, 1.0, GrColor, GrShade);
}
}
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
2482,19 → 2482,19
if (currItem->GrType == 5)
{
if ((GrColor != CommonStrings::None) && (!GrColor.isEmpty()))
currItem->SetFarbe(&tmpc, GrColor, GrShade);
currItem->SetQColor(&tmpc, GrColor, GrShade);
currItem->fill_gradient.addStop(tmpc, 0.0, 0.5, 1.0, GrColor, GrShade);
if ((GrColor2 != CommonStrings::None) && (!GrColor2.isEmpty()))
currItem->SetFarbe(&tmpc, GrColor2, GrShade2);
currItem->SetQColor(&tmpc, GrColor2, GrShade2);
currItem->fill_gradient.addStop(tmpc, 1.0, 0.5, 1.0, GrColor2, GrShade2);
}
else
{
if ((GrColor2 != CommonStrings::None) && (!GrColor2.isEmpty()))
currItem->SetFarbe(&tmpc, GrColor2, GrShade2);
currItem->SetQColor(&tmpc, GrColor2, GrShade2);
currItem->fill_gradient.addStop(tmpc, 0.0, 0.5, 1.0, GrColor2, GrShade2);
if ((GrColor != CommonStrings::None) && (!GrColor.isEmpty()))
currItem->SetFarbe(&tmpc, GrColor, GrShade);
currItem->SetQColor(&tmpc, GrColor, GrShade);
currItem->fill_gradient.addStop(tmpc, 1.0, 0.5, 1.0, GrColor, GrShade);
}
}
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.h
124,7 → 124,7
\param plug ScribusMainWindow *
\retval QString Colour settings
*/
QString SetFarbe(QString farbe, int shad);
QString SetColor(QString farbe, int shad);
/*!
\author Franz Schmid
\param sl struct SingleLine *
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
279,7 → 279,7
continue;
if ((Item->fillColor() != CommonStrings::None) || (Item->GrType != 0))
{
fill = "fill:"+SetFarbe(Item->fillColor(), Item->fillShade())+";";
fill = "fill:"+SetColor(Item->fillColor(), Item->fillShade())+";";
if (Item->GrType != 0)
{
defi = docu->createElement("defs");
338,7 → 338,7
QDomElement itcl = docu->createElement("stop");
itcl.setAttribute("offset", FToStr(cstops.at(cst)->rampPoint*100)+"%");
itcl.setAttribute("stop-opacity", FToStr(cstops.at(cst)->opacity));
itcl.setAttribute("stop-color", SetFarbe(cstops.at(cst)->name, cstops.at(cst)->shade));
itcl.setAttribute("stop-color", SetColor(cstops.at(cst)->name, cstops.at(cst)->shade));
grad.appendChild(itcl);
}
defi.appendChild(grad);
356,7 → 356,7
fill = "fill:none;";
if (Item->lineColor() != CommonStrings::None)
{
stroke = "stroke:"+SetFarbe(Item->lineColor(), Item->lineShade())+";";
stroke = "stroke:"+SetColor(Item->lineColor(), Item->lineShade())+";";
if (Item->lineTransparency() != 0)
stroke += " stroke-opacity:"+FToStr(1.0 - Item->lineTransparency())+";";
}
755,12 → 755,12
{
int chst = hl->effects() & 127;
if (hl->fillColor() != CommonStrings::None)
tp->setAttribute("fill", SetFarbe(hl->fillColor(), hl->fillShade()));
tp->setAttribute("fill", SetColor(hl->fillColor(), hl->fillShade()));
else
tp->setAttribute("fill", "none");
if ((hl->strokeColor() != CommonStrings::None) && (chst & 4))
{
tp->setAttribute("stroke", SetFarbe(hl->strokeColor(), hl->strokeShade()));
tp->setAttribute("stroke", SetColor(hl->strokeColor(), hl->strokeShade()));
tp->setAttribute("stroke-width", FToStr(hl->font().strokeWidth(hl->fontSize() / 10.0)));
}
else
780,7 → 780,7
}
}
 
QString SVGExPlug::SetFarbe(QString farbe, int shad)
QString SVGExPlug::SetColor(QString farbe, int shad)
{
const ScColor& col = m_Doc->PageColors[farbe];
return ScColorEngine::getShadeColorProof(col, m_Doc, shad).name();
789,7 → 789,7
QString SVGExPlug::GetMultiStroke(struct SingleLine *sl, PageItem *Item)
{
QString tmp = "fill:none; ";
tmp += "stroke:"+SetFarbe(sl->Color, sl->Shade)+"; ";
tmp += "stroke:"+SetColor(sl->Color, sl->Shade)+"; ";
if (Item->fillTransparency() != 0)
tmp += " stroke-opacity:"+FToStr(1.0 - Item->fillTransparency())+"; ";
tmp += "stroke-width:"+FToStr(sl->Width)+"; ";
/trunk/Scribus/scribus/scpreview.cpp
339,7 → 339,7
QString name = it.attribute("NAME");
double ramp = it.attribute("RAMP", "0.0").toDouble();
int shade = it.attribute("SHADE", "100").toInt();
SetFarbe(&tmpfa, name, shade);
SetQColor(&tmpfa, name, shade);
OB.fill_gradient.addStop(tmpfa, ramp, 0.5, 1.0, name, shade);
}
if (it.tagName()=="ITEXT")
467,7 → 467,7
pS->rotate(static_cast<double>(OB.Rot));
if (OB.Pcolor != CommonStrings::None)
{
SetFarbe(&tmpfa, OB.Pcolor, OB.Shade);
SetQColor(&tmpfa, OB.Pcolor, OB.Shade);
pS->setBrush(tmpfa);
pS->setFillMode(1);
}
482,19 → 482,19
if (OB.GrType == 5)
{
if ((OB.GrColor != CommonStrings::None) && (!OB.GrColor.isEmpty()))
SetFarbe(&tmpfa, OB.GrColor, OB.GrShade);
SetQColor(&tmpfa, OB.GrColor, OB.GrShade);
pS->fill_gradient.addStop(tmpfa, 0.0, 0.5, 1.0);
if ((OB.GrColor2 != CommonStrings::None) && (!OB.GrColor2.isEmpty()))
SetFarbe(&tmpfa, OB.GrColor2, OB.GrShade2);
SetQColor(&tmpfa, OB.GrColor2, OB.GrShade2);
pS->fill_gradient.addStop(tmpfa, 1.0, 0.5, 1.0);
}
else
{
if ((OB.GrColor2 != CommonStrings::None) && (!OB.GrColor2.isEmpty()))
SetFarbe(&tmpfa, OB.GrColor2, OB.GrShade2);
SetQColor(&tmpfa, OB.GrColor2, OB.GrShade2);
pS->fill_gradient.addStop(tmpfa, 0.0, 0.5, 1.0);
if ((OB.GrColor != CommonStrings::None) && (!OB.GrColor.isEmpty()))
SetFarbe(&tmpfa, OB.GrColor, OB.GrShade);
SetQColor(&tmpfa, OB.GrColor, OB.GrShade);
pS->fill_gradient.addStop(tmpfa, 1.0, 0.5, 1.0);
}
}
542,7 → 542,7
}
if (OB.Pcolor2 != CommonStrings::None)
{
SetFarbe(&tmpfa, OB.Pcolor2, OB.Shade2);
SetQColor(&tmpfa, OB.Pcolor2, OB.Shade2);
if ((OB.Pwidth == 0) && (OB.PType != 5))
pS->setLineWidth(0);
else
640,13 → 640,13
mode = 0;
if (hl->fillColor() != CommonStrings::None)
{
SetFarbe(&tmpfa, hl->fillColor(), hl->fillShade());
SetQColor(&tmpfa, hl->fillColor(), hl->fillShade());
pS->setBrush(tmpfa);
mode = 2;
}
if (hl->strokeColor() != CommonStrings::None)
{
SetFarbe(&tmpfa, hl->strokeColor(), hl->strokeShade());
SetQColor(&tmpfa, hl->strokeColor(), hl->strokeShade());
pS->setPen(tmpfa, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
mode += 1;
}
664,7 → 664,7
multiLine ml = MLineStyles[OB.NamedLStyle];
for (int it = ml.size()-1; it > -1; it--)
{
SetFarbe(&tmpfa, ml[it].Color, ml[it].Shade);
SetQColor(&tmpfa, ml[it].Color, ml[it].Shade);
pS->setPen(tmpfa,
qMax(static_cast<int>(ml[it].Width), 1),
static_cast<Qt::PenStyle>(ml[it].Dash),
759,7 → 759,7
multiLine ml = MLineStyles[OB.NamedLStyle];
for (int it = ml.size()-1; it > -1; it--)
{
SetFarbe(&tmpfa, ml[it].Color, ml[it].Shade);
SetQColor(&tmpfa, ml[it].Color, ml[it].Shade);
pS->setPen(tmpfa, ml[it].Width,
static_cast<Qt::PenStyle>(ml[it].Dash),
static_cast<Qt::PenCapStyle>(ml[it].LineEnd),
844,7 → 844,7
continue;
if (hl->fillColor() != CommonStrings::None)
{
SetFarbe(&tmpfa, hl->fillColor(), hl->fillShade());
SetQColor(&tmpfa, hl->fillColor(), hl->fillShade());
pS->setPen(tmpfa);
}
chs = hl->fontSize();
921,7 → 921,7
pS->setPenOpacity(1.0 - OB.TranspStroke);
if (OB.Pcolor2 != CommonStrings::None)
{
SetFarbe(&tmpfa, OB.Pcolor2, OB.Shade2);
SetQColor(&tmpfa, OB.Pcolor2, OB.Shade2);
pS->setPen(tmpfa, OB.Pwidth, Qt::PenStyle(OB.PLineArt), Qt::PenCapStyle(OB.PLineEnd), Qt::PenJoinStyle(OB.PLineJoin));
// if (DashValues.count() != 0)
// pS->setDash(DashValues, DashOffset);
936,7 → 936,7
multiLine ml = MLineStyles[OB.NamedLStyle];
for (int it = ml.size()-1; it > -1; it--)
{
SetFarbe(&tmpfa, ml[it].Color, ml[it].Shade);
SetQColor(&tmpfa, ml[it].Color, ml[it].Shade);
pS->setPen(tmpfa, ml[it].Width,
static_cast<Qt::PenStyle>(ml[it].Dash),
static_cast<Qt::PenCapStyle>(ml[it].LineEnd),
973,7 → 973,7
return ret;
}
 
void ScPreview::SetFarbe(QColor *tmp, const QString& farbe, double shad)
void ScPreview::SetQColor(QColor *tmp, const QString& farbe, double shad)
{
*tmp = ScColorEngine::getShadeColorProof(Farben[farbe], NULL, shad);
}
/trunk/Scribus/scribus/pslib.cpp
1986,7 → 1986,7
{
SetClipPath(&ite->PoLine);
PS_closepath();
SetFarbe(ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr);
SetColor(ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
putColor(ite->fillColor(), ite->fillShade(), true);
}
2022,7 → 2022,7
{
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
SetFarbe(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
SetColor(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ite->lineWidth());
PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
2036,7 → 2036,7
multiLine ml = Doc->MLineStyles[ite->NamedLStyle];
for (int it = ml.size()-1; it > -1; it--)
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ml[it].Width);
PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
2062,7 → 2062,7
}
if (ite->fillColor() != CommonStrings::None)
{
SetFarbe(ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr);
SetColor(ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_translate(ite->xPos() - mPage->xOffset(), mPage->height() - (ite->yPos() - mPage->yOffset()));
2092,7 → 2092,7
{
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
SetFarbe(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
SetColor(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ite->lineWidth());
PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
2108,7 → 2108,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ml[it].Width);
PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
2154,7 → 2154,7
}
if (ite->lineColor() != CommonStrings::None)
{
SetFarbe(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
SetColor(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(ite->lineWidth());
2251,12 → 2251,12
}
if (c->fillColor() != CommonStrings::None)
{
SetFarbe(c->fillColor(), c->fillShade(), &h, &s, &v, &k, gcr);
SetColor(c->fillColor(), c->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
if (c->lineColor() != CommonStrings::None)
{
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
SetColor(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(c->lineWidth());
2319,7 → 2319,7
{
if ((c->NamedLStyle.isEmpty()) && (c->lineWidth() != 0.0))
{
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
SetColor(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(c->lineWidth());
PS_setcapjoin(c->PLineEnd, c->PLineJoin);
2335,7 → 2335,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ml[it].Width);
PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
2396,7 → 2396,7
setTextSt(Doc, c, gcr, PNr-1, a, sep, farb, ic, master);
if (((c->lineColor() != CommonStrings::None) || (!c->NamedLStyle.isEmpty())) && (!c->isTableItem))
{
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
SetColor(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(c->lineWidth());
PS_setcapjoin(c->PLineEnd, c->PLineJoin);
2414,7 → 2414,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ml[it].Width);
PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
2441,7 → 2441,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ml[it].Width);
PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
2460,7 → 2460,7
arrowTrans.scale(c->lineWidth(), c->lineWidth());
arrowTrans.scale(-1,1);
arrow.map(arrowTrans);
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
SetColor(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_newpath();
SetClipPath(&arrow);
2474,7 → 2474,7
arrowTrans.translate(c->width(), 0);
arrowTrans.scale(c->lineWidth(), c->lineWidth());
arrow.map(arrowTrans);
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
SetColor(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_newpath();
SetClipPath(&arrow);
2514,7 → 2514,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ml[it].Width);
PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
2552,7 → 2552,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ml[it].Width);
PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
2578,7 → 2578,7
arrowTrans.rotate(r);
arrowTrans.scale(c->lineWidth(), c->lineWidth());
arrow.map(arrowTrans);
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
SetColor(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_newpath();
SetClipPath(&arrow);
2603,7 → 2603,7
arrowTrans.rotate(r);
arrowTrans.scale(c->lineWidth(), c->lineWidth());
arrow.map(arrowTrans);
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
SetColor(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_newpath();
SetClipPath(&arrow);
2632,7 → 2632,7
{
if ((ml[it].Color != CommonStrings::None) && (ml[it].Width != 0))
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ml[it].Width);
PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
2677,7 → 2677,7
tsz = style.fontSize() * Doc->typographicSettings.scalingSuperScript / 100;
if (style.fillColor() != CommonStrings::None)
{
SetFarbe(style.fillColor(), style.fillShade(), &h, &s, &v, &k, gcr);
SetColor(style.fillColor(), style.fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
if ((hl->ch == SpecialChars::OBJECT) && (hl->embedded.hasItem()))
2773,7 → 2773,7
PS_save();
if (style.fillColor() != CommonStrings::None)
{
SetFarbe(style.fillColor(), style.fillShade(), &h, &s, &v, &k, gcr);
SetColor(style.fillColor(), style.fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PutStream("["+ToStr(1) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(-1) + " " + ToStr(-hl->PRot) + " " + ToStr(0) + "]\n");
if (c->textPathFlipped)
2816,7 → 2816,7
{
PS_save();
PS_setlinewidth(tsz * style.outlineWidth() / 10000.0);
SetFarbe(style.strokeColor(), style.strokeShade(), &h, &s, &v, &k, gcr);
SetColor(style.strokeColor(), style.strokeShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
if ((colorsToUse[style.strokeColor()].isSpotColor()) && (!DoSep))
PutStream(ToStr(style.strokeShade() / 100.0)+" "+spotMap[style.strokeColor()]);
2881,7 → 2881,7
PS_save();
PS_setlinewidth(tsz * style.outlineWidth() / 10000.0);
PS_translate(0, tsz / 10.0);
SetFarbe(style.strokeColor(), style.strokeShade(), &h, &s, &v, &k, gcr);
SetColor(style.strokeColor(), style.strokeShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetClipPath(&gly);
PS_closepath();
3019,7 → 3019,7
}
if (c->lineColor() != CommonStrings::None)
{
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
SetColor(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(c->lineWidth());
3156,7 → 3156,7
isFirst = false;
lastStop = actualStop;
StopVec.prepend(sqrt(pow(EndX - StartX, 2) + pow(EndY - StartY,2))*cstops.at(cst)->rampPoint);
SetFarbe(cstops.at(cst)->name, cstops.at(cst)->shade, &ch, &cs, &cv, &ck, gcr);
SetColor(cstops.at(cst)->name, cstops.at(cst)->shade, &ch, &cs, &cv, &ck, gcr);
QString GCol;
if (GraySc)
GCol = hs.setNum((255.0 - qMin(0.3 * ch + 0.59 * cs + 0.11 * cv + ck, 255.0)) / 255.0);
3183,7 → 3183,7
double y = (1 - cstops.at(cst)->rampPoint) * StartY + cstops.at(cst)->rampPoint * EndY;
StopVec.append(x);
StopVec.append(-y);
SetFarbe(cstops.at(cst)->name, cstops.at(cst)->shade, &ch, &cs, &cv, &ck, gcr);
SetColor(cstops.at(cst)->name, cstops.at(cst)->shade, &ch, &cs, &cv, &ck, gcr);
QString GCol;
if (GraySc)
GCol = hs.setNum((255.0 - qMin(0.3 * ch + 0.59 * cs + 0.11 * cv + ck, 255.0)) / 255.0);
3198,13 → 3198,13
}
}
 
void PSLib::SetFarbe(const QString& farb, double shade, int *h, int *s, int *v, int *k, bool gcr)
void PSLib::SetColor(const QString& farb, double shade, int *h, int *s, int *v, int *k, bool gcr)
{
ScColor& col = m_Doc->PageColors[farb];
SetFarbe(col, shade, h, s, v, k, gcr);
SetColor(col, shade, h, s, v, k, gcr);
}
 
void PSLib::SetFarbe(const ScColor& farb, double shade, int *h, int *s, int *v, int *k, bool gcr)
void PSLib::SetColor(const ScColor& farb, double shade, int *h, int *s, int *v, int *k, bool gcr)
{
int h1, s1, v1, k1;
h1 = *h;
3489,7 → 3489,7
}
if (hl->fillColor() != CommonStrings::None)
{
SetFarbe(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
SetColor(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
if ((colorsToUse[hl->fillColor()].isSpotColor()) && (!DoSep))
PutStream(ToStr(hl->fillShade() / 100.0)+" "+spotMap[hl->fillColor()]);
3536,7 → 3536,7
PS_scale(1, hl->scaleV() / 1000.0);
if (hl->fillColor() != CommonStrings::None)
{
SetFarbe(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
SetColor(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
if ((colorsToUse[hl->fillColor()].isSpotColor()) && (!DoSep))
{
3576,7 → 3576,7
PS_translate(x+hl->glyph.xoffset, (y+hl->glyph.yoffset - (tsz / 10.0)) * -1);
if (hl->scaleV() != 1000)
PS_translate(0, -((tsz / 10.0) - (tsz / 10.0) * (hl->scaleV() / 1000.0)));
SetFarbe(hl->strokeColor(), hl->strokeShade(), &h, &s, &v, &k, gcr);
SetColor(hl->strokeColor(), hl->strokeShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetClipPath(&gly);
PS_closepath();
3615,7 → 3615,7
{
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
PS_setdash(Qt::SolidLine, 0, dum);
SetFarbe(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
SetColor(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(lw);
3653,7 → 3653,7
{
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
PS_setdash(Qt::SolidLine, 0, dum);
SetFarbe(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
SetColor(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(lw);
3684,7 → 3684,7
PS_save();
PS_newpath();
PS_translate(x + hl->glyph.xoffset+wide, (y + hl->glyph.yoffset - (tsz / 10.0)) * -1);
SetFarbe(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
SetColor(hl->fillColor(), hl->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetClipPath(&gly);
PS_closepath();
3822,7 → 3822,7
{
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
PS_setdash(Qt::SolidLine, 0, dum);
SetFarbe(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
SetColor(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(lw);
3864,7 → 3864,7
}
if (cstyle.fillColor() != CommonStrings::None)
{
SetFarbe(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
SetColor(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
if ((colorsToUse[cstyle.fillColor()].isSpotColor()) && (!DoSep) && (useSpotColors))
PutStream(ToStr(cstyle.fillShade() / 100.0)+" "+spotMap[cstyle.fillColor()]);
3891,7 → 3891,7
PS_scale(glyphs.scaleH, glyphs.scaleV);
if (cstyle.fillColor() != CommonStrings::None)
{
SetFarbe(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
SetColor(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
if ((colorsToUse[cstyle.fillColor()].isSpotColor()) && (!DoSep) && (useSpotColors))
{
3929,7 → 3929,7
PS_setdash(Qt::SolidLine, 0, dum);
PS_translate(x + glyphs.xoffset, (y + glyphs.yoffset - (tsz / 10.0)) * -1);
PS_translate(0, -((tsz / 10.0) - (tsz / 10.0) * glyphs.scaleV));
SetFarbe(cstyle.strokeColor(), cstyle.strokeShade(), &h, &s, &v, &k, gcr);
SetColor(cstyle.strokeColor(), cstyle.strokeShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetClipPath(&gly);
PS_closepath();
3969,7 → 3969,7
{
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
PS_setdash(Qt::SolidLine, 0, dum);
SetFarbe(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
SetColor(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(lw);
4005,7 → 4005,7
PS_save();
PS_newpath();
PS_translate(x + glyphs.xoffset + glyphs.xadvance, (y + glyphs.yoffset - (tsz / 10.0)) * -1);
SetFarbe(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
SetColor(cstyle.fillColor(), cstyle.fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetClipPath(&gly);
PS_closepath();
/trunk/Scribus/scribus/story.h
96,7 → 96,7
void updateSel(const ParagraphStyle& style);
void deleteSel();
void setStyle(int Csty);
void setFarbe(bool marker);
void setColor(bool marker);
void insChars(QString t);
void insStyledText();
void copyStyledText();