Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 9618 → Rev 9619

/branches/Version135x/Scribus/scribus/pdflib.cpp
1430,9 → 1430,11
{
if ((colorsToUse[itf.key()].isSpotColor()) || (colorsToUse[itf.key()].isRegistrationColor()))
{
CMYKColor cmykValues;
int cc, cm, cy, ck;
struct SpotC spotD;
colorsToUse[itf.key()].getCMYK(&cc, &cm, &cy, &ck);
ScColorEngine::getCMYKValues(colorsToUse[itf.key()], &doc, cmykValues);
cmykValues.getValues(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 ";
5095,6 → 5097,7
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;
5334,13 → 5337,15
if (twoSpot)
{
PutDoc("/Domain [0.0 1.0 0.0 1.0]\n");
doc.PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(doc.PageColors[colorNames[c]], &doc, cmykValues);
cmykValues.getValues(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";
doc.PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(doc.PageColors[colorNames[c+1]], &doc, cmykValues);
cmykValues.getValues(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";
5350,9 → 5355,15
{
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)
doc.PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
{
ScColorEngine::getCMYKValues(doc.PageColors[colorNames[c]], &doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
}
else
doc.PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
{
ScColorEngine::getCMYKValues(doc.PageColors[colorNames[c+1]], &doc, cmykValues);
cmykValues.getValues(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,6 → 87,7
GrayCalc += " oldsetgray} bind def\n";
Farben = "";
FNamen = "";
CMYKColor cmykValues;
ColorList::Iterator itf;
int c, m, y, k;
bool erst = true;
97,7 → 98,8
{
if (((DocColors[itf.key()].isSpotColor()) || (DocColors[itf.key()].isRegistrationColor())) && (useSpotColors))
{
DocColors[itf.key()].getCMYK(&c, &m, &y, &k);
ScColorEngine::getCMYKValues(DocColors[itf.key()], DocColors.document(), cmykValues);
cmykValues.getValues(c, m, y, k);
colorDesc += "/Spot"+PSEncode(itf.key())+" { [ /Separation (";
if (DocColors[itf.key()].isRegistrationColor())
colorDesc += "All";
112,7 → 114,8
}
if ((itf.key() != "Cyan") && (itf.key() != "Magenta") && (itf.key() != "Yellow") && (itf.key() != "Black") && DocColors[itf.key()].isSpotColor())
{
DocColors[itf.key()].getCMYK(&c, &m, &y, &k);
ScColorEngine::getCMYKValues(DocColors[itf.key()], DocColors.document(), cmykValues);
cmykValues.getValues(c, m, y, k);
if (!erst)
{
Farben += "%%+ ";
958,6 → 961,7
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)
996,12 → 1000,14
if (oneSpot1)
{
PutSeite(" /Cyan /Magenta /Yellow /Black ("+spot1+") ]\n");
m_Doc->PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
}
else if (oneSpot2)
{
PutSeite(" /Cyan /Magenta /Yellow /Black ("+spot2+") ]\n");
m_Doc->PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c+1]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
}
else if (twoSpot)
{
1011,13 → 1017,15
PutSeite("{\n");
if (twoSpot)
{
m_Doc->PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c]], m_Doc, cmykValues);
cmykValues.getValues(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");
m_Doc->PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c+1]], m_Doc, cmykValues);
cmykValues.getValues(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");
1108,6 → 1116,7
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)
1147,12 → 1156,14
if (oneSpot1)
{
PutSeite(" /Cyan /Magenta /Yellow /Black ("+spot1+") ]\n");
m_Doc->PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
}
else if (oneSpot2)
{
PutSeite(" /Cyan /Magenta /Yellow /Black ("+spot2+") ]\n");
m_Doc->PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c+1]], m_Doc, cmykValues);
cmykValues.getValues(cc, mc, yc, kc);
}
else if (twoSpot)
{
1162,13 → 1173,15
PutSeite("{\n");
if (twoSpot)
{
m_Doc->PageColors[colorNames[c]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c]], m_Doc, cmykValues);
cmykValues.getValues(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");
m_Doc->PageColors[colorNames[c+1]].getCMYK(&cc, &mc, &yc, &kc);
ScColorEngine::getCMYKValues(m_Doc->PageColors[colorNames[c+1]], m_Doc, cmykValues);
cmykValues.getValues(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");