Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 9619 → Rev 9618

/branches/Version135x/Scribus/scribus/pdflib.cpp
1430,11 → 1430,9
{
if ((colorsToUse[itf.key()].isSpotColor()) || (colorsToUse[itf.key()].isRegistrationColor()))
{
CMYKColor cmykValues;
int cc, cm, cy, ck;
struct SpotC spotD;
ScColorEngine::getCMYKValues(colorsToUse[itf.key()], &doc, cmykValues);
cmykValues.getValues(cc, cm, cy, ck);
colorsToUse[itf.key()].getCMYK(&cc, &cm, &cy, &ck);
QString colorDesc = "{\ndup "+FToStr(static_cast<double>(cc) / 255)+"\nmul exch dup ";
colorDesc += FToStr(static_cast<double>(cm) / 255)+"\nmul exch dup ";
colorDesc += FToStr(static_cast<double>(cy) / 255)+"\nmul exch ";
5097,7 → 5095,6
bool twoSpot = false;
bool spotMode = false;
int cc, mc, yc, kc;
CMYKColor cmykValues;
double w = currItem->width();
double h = -currItem->height();
double w2 = currItem->GrStartX;
5337,15 → 5334,13
if (twoSpot)
{
PutDoc("/Domain [0.0 1.0 0.0 1.0]\n");
ScColorEngine::getCMYKValues(doc.PageColors[colorNames[c]], &doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
doc.PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
colorDesc = "{\nexch\n";
colorDesc += "dup "+FToStr(static_cast<double>(cc) / 255.0)+" mul exch\n";
colorDesc += "dup "+FToStr(static_cast<double>(mc) / 255.0)+" mul exch\n";
colorDesc += "dup "+FToStr(static_cast<double>(yc) / 255.0)+" mul exch\n";
colorDesc += "dup "+FToStr(static_cast<double>(kc) / 255.0)+" mul exch pop 5 -1 roll\n";
ScColorEngine::getCMYKValues(doc.PageColors[colorNames[c+1]], &doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
doc.PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
colorDesc += "dup "+FToStr(static_cast<double>(cc) / 255.0)+" mul 6 -1 roll add dup 1.0 gt {pop 1.0} if 5 1 roll\n";
colorDesc += "dup "+FToStr(static_cast<double>(mc) / 255.0)+" mul 5 -1 roll add dup 1.0 gt {pop 1.0} if 4 1 roll\n";
colorDesc += "dup "+FToStr(static_cast<double>(yc) / 255.0)+" mul 4 -1 roll add dup 1.0 gt {pop 1.0} if 3 1 roll\n";
5355,15 → 5350,9
{
PutDoc("/Domain [0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0]\n");
if (oneSpot1)
{
ScColorEngine::getCMYKValues(doc.PageColors[colorNames[c]], &doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
}
doc.PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
else
{
ScColorEngine::getCMYKValues(doc.PageColors[colorNames[c+1]], &doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
}
doc.PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
colorDesc = "{\ndup "+FToStr(static_cast<double>(cc) / 255.0)+" mul 6 -1 roll add dup 1.0 gt {pop 1.0} if 5 1 roll\n";
colorDesc += "dup "+FToStr(static_cast<double>(mc) / 255.0)+" mul 5 -1 roll add dup 1.0 gt {pop 1.0} if 4 1 roll\n";
colorDesc += "dup "+FToStr(static_cast<double>(yc) / 255.0)+" mul 4 -1 roll add dup 1.0 gt {pop 1.0} if 3 1 roll\n";
/branches/Version135x/Scribus/scribus/pslib.cpp
87,7 → 87,6
GrayCalc += " oldsetgray} bind def\n";
Farben = "";
FNamen = "";
CMYKColor cmykValues;
ColorList::Iterator itf;
int c, m, y, k;
bool erst = true;
98,8 → 97,7
{
if (((DocColors[itf.key()].isSpotColor()) || (DocColors[itf.key()].isRegistrationColor())) && (useSpotColors))
{
ScColorEngine::getCMYKValues(DocColors[itf.key()], DocColors.document(), cmykValues);
cmykValues.getValues(c, m, y, k);
DocColors[itf.key()].getCMYK(&c, &m, &y, &k);
colorDesc += "/Spot"+PSEncode(itf.key())+" { [ /Separation (";
if (DocColors[itf.key()].isRegistrationColor())
colorDesc += "All";
114,8 → 112,7
}
if ((itf.key() != "Cyan") && (itf.key() != "Magenta") && (itf.key() != "Yellow") && (itf.key() != "Black") && DocColors[itf.key()].isSpotColor())
{
ScColorEngine::getCMYKValues(DocColors[itf.key()], DocColors.document(), cmykValues);
cmykValues.getValues(c, m, y, k);
DocColors[itf.key()].getCMYK(&c, &m, &y, &k);
if (!erst)
{
Farben += "%%+ ";
961,7 → 958,6
bool oneSpot2 = false;
bool twoSpot = false;
int cc, mc, yc, kc;
CMYKColor cmykValues;
PutSeite( "clipsave\n" );
PutSeite("eoclip\n");
for (int c = 0; c < Colors.count()-1; ++c)
1000,14 → 996,12
if (oneSpot1)
{
PutSeite(" /Cyan /Magenta /Yellow /Black ("+spot1+") ]\n");
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
m_Doc->PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
}
else if (oneSpot2)
{
PutSeite(" /Cyan /Magenta /Yellow /Black ("+spot2+") ]\n");
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c+1]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
m_Doc->PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
}
else if (twoSpot)
{
1017,15 → 1011,13
PutSeite("{\n");
if (twoSpot)
{
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
m_Doc->PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
PutSeite("exch\n");
PutSeite("dup "+ToStr(static_cast<double>(cc) / 255.0)+" mul exch\n");
PutSeite("dup "+ToStr(static_cast<double>(mc) / 255.0)+" mul exch\n");
PutSeite("dup "+ToStr(static_cast<double>(yc) / 255.0)+" mul exch\n");
PutSeite("dup "+ToStr(static_cast<double>(kc) / 255.0)+" mul exch pop 5 -1 roll\n");
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c+1]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
m_Doc->PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
PutSeite("dup "+ToStr(static_cast<double>(cc) / 255.0)+" mul 6 -1 roll add dup 1.0 gt {pop 1.0} if 5 1 roll\n");
PutSeite("dup "+ToStr(static_cast<double>(mc) / 255.0)+" mul 5 -1 roll add dup 1.0 gt {pop 1.0} if 4 1 roll\n");
PutSeite("dup "+ToStr(static_cast<double>(yc) / 255.0)+" mul 4 -1 roll add dup 1.0 gt {pop 1.0} if 3 1 roll\n");
1116,7 → 1108,6
bool oneSpot2 = false;
bool twoSpot = false;
int cc, mc, yc, kc;
CMYKColor cmykValues;
PutSeite( "clipsave\n" );
PutSeite("eoclip\n");
for (int c = 0; c < Colors.count()-1; ++c)
1156,14 → 1147,12
if (oneSpot1)
{
PutSeite(" /Cyan /Magenta /Yellow /Black ("+spot1+") ]\n");
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
m_Doc->PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
}
else if (oneSpot2)
{
PutSeite(" /Cyan /Magenta /Yellow /Black ("+spot2+") ]\n");
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c+1]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
m_Doc->PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
}
else if (twoSpot)
{
1173,15 → 1162,13
PutSeite("{\n");
if (twoSpot)
{
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
m_Doc->PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
PutSeite("exch\n");
PutSeite("dup "+ToStr(static_cast<double>(cc) / 255.0)+" mul exch\n");
PutSeite("dup "+ToStr(static_cast<double>(mc) / 255.0)+" mul exch\n");
PutSeite("dup "+ToStr(static_cast<double>(yc) / 255.0)+" mul exch\n");
PutSeite("dup "+ToStr(static_cast<double>(kc) / 255.0)+" mul exch pop 5 -1 roll\n");
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c+1]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
m_Doc->PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
PutSeite("dup "+ToStr(static_cast<double>(cc) / 255.0)+" mul 6 -1 roll add dup 1.0 gt {pop 1.0} if 5 1 roll\n");
PutSeite("dup "+ToStr(static_cast<double>(mc) / 255.0)+" mul 5 -1 roll add dup 1.0 gt {pop 1.0} if 4 1 roll\n");
PutSeite("dup "+ToStr(static_cast<double>(yc) / 255.0)+" mul 4 -1 roll add dup 1.0 gt {pop 1.0} if 3 1 roll\n");