Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 5368 → Rev 5369

/branches/Version13x/Scribus/scribus/util.cpp
92,7 → 92,8
#include CMS_INC
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransG;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
/branches/Version13x/Scribus/scribus/scribuscore.cpp
38,7 → 38,8
#include "cmserrorhandling.h"
cmsHPROFILE CMSoutputProf;
cmsHPROFILE CMSprinterProf;
cmsHTRANSFORM stdTransG;
cmsHTRANSFORM stdTransRGBMonG;
cmsHTRANSFORM stdTransCMYKMonG;
cmsHTRANSFORM stdProofG;
cmsHTRANSFORM stdTransImgG;
cmsHTRANSFORM stdProofImgG;
/branches/Version13x/Scribus/scribus/sccolor.h
78,7 → 78,7
/** \brief Computes a ScColor for a QColor */
void fromQColor(QColor color);
 
/** \brief Returns the transformed/proofed RGB color */
/** \brief Returns the RGB color */
QColor getRGBColor();
void getRawRGBColor(int *r, int *g, int *b);
QColor getRawRGBColor();
95,7 → 95,23
/** \brief get RGB values of a specified shade */
void getShadeColorRGB(int *r, int *g, int *b, int level);
 
/** \brief Return a proofed QColor with the specified shade */
/** \brief Return a color converted to monitor color space. No soft-proofing is done. */
QColor getDisplayColor();
 
/** \brief Return a color converted to monitor color space. No soft-proofing is done
* If gamut check is valid, the return value may be an gamut warning . */
QColor getDisplayColorGC();
 
/** \brief Return a proofed QColor with 100% shade and optional gamut check.
* If color management is enabled, returned value use the monitor color space. */
QColor getColorProof(bool gamutCheck = false);
 
/** \brief Return a proofed QColor with the specified shade.
* If color management is enabled, returned value use the rgb solid colors space. */
QColor getShadeColor(int level);
 
/** \brief Return a proofed QColor with the specified shade.
* If color management is enabled, returned value use the monitor color space. */
QColor getShadeColorProof(int level);
 
/** \brief Applys Gray-Component-Removal to an ScColor */
156,6 → 172,22
 
/** \brief Flag, true if out of Gamut */
bool outOfGamutFlag;
 
/** \brief Return a proofed QColor from a rgb color.
* If color management is enabled, returned value use the monitor color space. */
QColor getColorProof(int r, int g, int b, bool gamutCkeck);
 
/** \brief Return a proofed QColor from a cmyk color.
* If color management is enabled, returned value use the monitor color space. */
QColor getColorProof(int c, int m, int y, int k, bool gamutCkeck);
 
/** \brief Return a proofed QColor from a rgb color using doc rgb color space as input.
* If color management is enabled, returned value use the monitor rgb color space. */
QColor getDisplayColor(int r, int g, int b);
 
/** \brief Return a proofed QColor from a cmyk color using doc cmyk color space as input.
* If color management is enabled, returned value use the monitor rgb color space. */
QColor getDisplayColor(int c, int m, int y, int k);
};
 
/** \brief Definition of the Color list */
/branches/Version13x/Scribus/scribus/reformdoc.cpp
49,7 → 49,8
#ifdef HAVE_CMS
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransG;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
987,7 → 988,8
if ( currDoc->OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles) )
{
stdProofG = currDoc->stdProof;
stdTransG = currDoc->stdTrans;
stdTransRGBMonG = currDoc->stdTransRGBMon;
stdTransCMYKMonG = currDoc->stdTransCMYKMon;
stdProofImgG = currDoc->stdProofImg;
stdTransImgG = currDoc->stdTransImg;
stdProofCMYKG = currDoc->stdProofCMYK;
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
66,7 → 66,8
#include "cmserrorhandling.h"
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransG;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
287,7 → 288,8
DocInputCMYKProf = NULL;
DocOutputProf = NULL;
DocPrinterProf = NULL;
stdTrans = NULL;
stdTransRGBMon = NULL;
stdTransCMYKMon = NULL;
stdProof = NULL;
stdTransImg = NULL;
stdProofImg = NULL;
370,7 → 372,8
if (OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles))
{
stdProofG = stdProof;
stdTransG = stdTrans;
stdTransRGBMonG = stdTransRGBMon;
stdTransCMYKMonG = stdTransCMYKMon;
stdProofImgG = stdProofImg;
stdTransImgG = stdTransImg;
stdProofCMYKG = stdProofCMYK;
434,8 → 437,10
cmsCloseProfile(DocOutputProf);
if (DocPrinterProf)
cmsCloseProfile(DocPrinterProf);
if (stdTrans)
cmsDeleteTransform(stdTrans);
if (stdTransRGBMon)
cmsDeleteTransform(stdTransRGBMon);
if (stdTransCMYKMon)
cmsDeleteTransform(stdTransCMYKMon);
if (stdProof)
cmsDeleteTransform(stdProof);
if (stdTransImg)
456,7 → 461,8
DocInputCMYKProf = NULL;
DocOutputProf = NULL;
DocPrinterProf = NULL;
stdTrans = NULL;
stdTransRGBMon = NULL;
stdTransCMYKMon = NULL;
stdProof = NULL;
stdTransImg = NULL;
stdProofImg = NULL;
503,41 → 509,45
return false;
}
int dcmsFlags = 0;
int dcmsFlags2 = 0;
int dcmsFlagsGC = 0;
dcmsFlags |= cmsFLAGS_LOWRESPRECALC;
dcmsFlags2 |= cmsFLAGS_LOWRESPRECALC;
dcmsFlagsGC |= cmsFLAGS_LOWRESPRECALC;
// int dcmsFlags2 = cmsFLAGS_NOTPRECALC;
if (CMSSettings.GamutCheck)
dcmsFlags |= cmsFLAGS_GAMUTCHECK;
dcmsFlagsGC |= cmsFLAGS_GAMUTCHECK;
if (CMSSettings.BlackPoint)
{
dcmsFlags2 |= cmsFLAGS_BLACKPOINTCOMPENSATION;
dcmsFlags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
dcmsFlagsGC |= cmsFLAGS_BLACKPOINTCOMPENSATION;
}
// set Gamut alarm color to #00ff00
cmsSetAlarmCodes(0, 255, 0);
stdTrans = cmsCreateTransform(DocInputRGBProf, TYPE_RGB_16,
stdTransRGBMon = cmsCreateTransform(DocInputRGBProf, TYPE_RGB_16,
DocOutputProf, TYPE_RGB_16,
IntentColors,
dcmsFlags2);
dcmsFlags);
stdTransCMYKMon = cmsCreateTransform(DocInputCMYKProf, TYPE_CMYK_16,
DocOutputProf, TYPE_RGB_16,
IntentColors,
dcmsFlags);
// TODO : check input profiles used for images
stdProofImg = cmsCreateProofingTransform(DocInputRGBProf, TYPE_RGBA_8,
DocOutputProf, TYPE_RGBA_8,
DocPrinterProf,
IntentImages,
IntentImages, dcmsFlags | cmsFLAGS_SOFTPROOFING);
IntentImages, dcmsFlagsGC | cmsFLAGS_SOFTPROOFING);
stdTransImg = cmsCreateTransform(DocInputRGBProf, TYPE_RGBA_8,
DocOutputProf, TYPE_RGBA_8,
IntentImages,
dcmsFlags2);
dcmsFlags);
stdTransRGB = cmsCreateTransform(DocInputCMYKProf, TYPE_CMYK_16,
DocInputRGBProf, TYPE_RGB_16,
IntentColors,
dcmsFlags2);
dcmsFlags);
stdTransCMYK = cmsCreateTransform(DocInputRGBProf, TYPE_RGB_16,
DocInputCMYKProf, TYPE_CMYK_16,
IntentColors,
dcmsFlags2);
dcmsFlags);
if (static_cast<int>(cmsGetColorSpace(DocPrinterProf)) == icSigCmykData)
{
inputProf = (CMSSettings.SoftProofOn && CMSSettings.SoftProofFullOn) ? DocInputCMYKProf : DocPrinterProf;
/branches/Version13x/Scribus/scribus/scwinprint.cpp
356,7 → 356,7
bool success = true;
ScPainterEx_GDI *painter;
ScPageOutput *pageOutput;
QCString monitorProfile;
QCString inputProfile;
QCString printerProfile;
HCOLORSPACE hColorSpace = NULL;
double scalex = 1, scaley = 1;
367,14 → 367,14
if ( options.useICC && isPostscriptPrinter(printerDC) )
{
success = false;
QString mProf = doc->CMSSettings.DefaultMonitorProfile;
QString mProf = doc->CMSSettings.DefaultSolidColorRGBProfile;
QString pProf = doc->CMSSettings.DefaultPrinterProfile;
if ( ScCore->MonitorProfiles.contains(mProf) && ScCore->PrinterProfiles.contains(pProf) )
{
monitorProfile = QDir::convertSeparators(ScCore->MonitorProfiles[mProf]).local8Bit();
inputProfile = QDir::convertSeparators(ScCore->InputProfiles[mProf]).local8Bit();
printerProfile = QDir::convertSeparators(ScCore->PrinterProfiles[pProf]).local8Bit();
// Avoid color transform if input and output profile are the same
if ( monitorProfile != printerProfile )
if ( inputProfile != printerProfile )
{
// Setup input color space
LOGCOLORSPACE logColorSpace;
383,7 → 383,7
logColorSpace.lcsSignature = LCS_SIGNATURE;
logColorSpace.lcsCSType = LCS_CALIBRATED_RGB;
logColorSpace.lcsIntent = LCS_GM_GRAPHICS;
strncpy(logColorSpace.lcsFilename, monitorProfile.data(), MAX_PATH);
strncpy(logColorSpace.lcsFilename, inputProfile.data(), MAX_PATH);
// MSDN recommend to setup reasonable values even if profile is specified
// so let's use sRGB colorspace values
logColorSpace.lcsEndpoints.ciexyzRed.ciexyzX = __FXPT2DOT30(0.64);
/branches/Version13x/Scribus/scribus/sccolor.cpp
30,7 → 30,8
 
#ifdef HAVE_CMS
#include CMS_INC
extern cmsHTRANSFORM stdTransG;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransCMYKG;
extern cmsHTRANSFORM stdProofCMYKG;
38,6 → 39,7
extern cmsHTRANSFORM stdProofGCG;
extern cmsHTRANSFORM stdProofCMYKGCG;
extern bool SoftProofing;
extern bool Gamut;
extern bool CMSuse;
#endif
extern bool CMSavail;
133,6 → 135,13
return RGB;
}
QColor ScColor::getShadeColor(int level)
{
int r, g, b;
getShadeColorRGB(&r, &g, &b, level);
return QColor(r, g, b);
}
void ScColor::getShadeColorCMYK(int *c, int *m, int *y, int *k, int level)
{
if (Model == colorModelRGB)
183,24 → 192,62
}
}
 
QColor ScColor::getDisplayColor()
{
QColor tmp;
if (Model == colorModelRGB)
tmp = getDisplayColor(R, G, B);
else
tmp = getDisplayColor(C, M, Y, K);
return tmp;
}
 
QColor ScColor::getDisplayColorGC()
{
QColor tmp;
if( SoftProofing && Gamut )
{
checkGamut();
tmp = outOfGamutFlag ? QColor(0, 255, 0) : getDisplayColor();
}
else
tmp = getDisplayColor();
return tmp;
}
 
QColor ScColor::getColorProof(bool gamutCheck)
{
QColor tmp;
if (Model == colorModelRGB)
tmp = getColorProof(R, G, B, gamutCheck & Gamut);
else
tmp = getColorProof(C, M, Y, K, gamutCheck & Gamut);
return tmp;
}
 
QColor ScColor::getShadeColorProof(int level)
{
QColor tmp;
ScColor tmp2;
int r, g, b, c, m ,y, k;
#if defined HAVE_CMS
bool doGC = Gamut;
#else
bool doGC = false;
#endif
if (Model == colorModelRGB)
{
getShadeColorRGB(&r, &g, &b, level);
tmp2.setColorRGB(r, g, b);
tmp = getColorProof(r, g, b, doGC);
}
else
{
getShadeColorCMYK(&c, &m, &y, &k, level);
tmp2.setColor(c, m, y, k);
tmp = getColorProof(c, m, y, k, doGC);
}
return tmp2.getRGBColor();
return tmp;
}
 
void ScColor::getRawRGBColor(int *r, int *g, int *b)
422,31 → 469,14
inC[0] = R * 257;
inC[1] = G * 257;
inC[2] = B * 257;
if (SoftProofing)
{
if ((R == 0) && (B == 0) && (G == 255))
alert = false;
cmsDoTransform(stdProofG, inC, outC, 1);
R = outC[0] / 257;
G = outC[1] / 257;
B = outC[2] / 257;
if ((alert) && (R == 0) && (B == 0) && (G == 255))
outOfGamutFlag = true;
K = QMIN(QMIN(255 - R, 255 - G), 255 - B);
C = 255 - R - K;
M = 255 - G - K;
Y = 255 - B - K;
}
else
{
cmsDoTransform(stdTransCMYKG, inC, outC, 1);
C = outC[0] / 257;
M = outC[1] / 257;
Y = outC[2] / 257;
K = outC[3] / 257;
checkGamut();
}
}
}
else
{
inC[0] = C * 257;
453,23 → 483,11
inC[1] = M * 257;
inC[2] = Y * 257;
inC[3] = K * 257;
if (SoftProofing)
{
if ((M == 0) && (K == 0) && (C == 255) && (Y == 255))
alert = false;
if ((M == 0) && (C == 0) && (Y == 0))
alert = false;
if ((M == C) && (C == Y) && (Y == K))
alert = false;
cmsDoTransform(stdProofCMYKG, inC, outC, 1);
if ((alert) && (R == 0) && (B == 0) && (G == 255))
outOfGamutFlag = true;
}
else
cmsDoTransform(stdTransRGBG, inC, outC, 1);
R = outC[0] / 257;
G = outC[1] / 257;
B = outC[2] / 257;
checkGamut();
}
}
else
494,6 → 512,128
RGB = QColor(R, G, B);
}
 
QColor ScColor::getColorProof(int r, int g, int b, bool gamutCkeck)
{
#ifdef HAVE_CMS
WORD inC[4];
WORD outC[4];
bool alert = true;
if ((CMSuse && CMSavail) && (!Spot))
{
inC[0] = r * 257;
inC[1] = g * 257;
inC[2] = b * 257;
if (SoftProofing)
{
cmsHTRANSFORM xform = gamutCkeck ? stdProofGCG : stdProofG;
cmsDoTransform(xform, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
}
else
{
cmsDoTransform(stdTransRGBMonG, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
}
}
#endif
return QColor(r, g, b);
}
 
QColor ScColor::getColorProof(int c, int m, int y, int k, bool gamutCkeck)
{
int r = 0, g = 0, b = 0;
#ifdef HAVE_CMS
WORD inC[4];
WORD outC[4];
bool alert = true;
if ((CMSuse && CMSavail) && (!Spot))
{
inC[0] = c * 257;
inC[1] = m * 257;
inC[2] = y * 257;
inC[3] = k * 257;
if (SoftProofing)
{
cmsHTRANSFORM xform = gamutCkeck ? stdProofCMYKGCG : stdProofCMYKG;
cmsDoTransform(xform, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
}
else
{
cmsDoTransform(stdTransCMYKMonG, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
}
}
else
{
#endif
r = 255 - QMIN(255, c + k);
g = 255 - QMIN(255, m + k);
b = 255 - QMIN(255, y + k);
#ifdef HAVE_CMS
}
#endif
return QColor(r, g, b);
}
 
QColor ScColor::getDisplayColor(int r, int g, int b)
{
#ifdef HAVE_CMS
WORD inC[4];
WORD outC[4];
bool alert = true;
if ((CMSuse && CMSavail) && (!Spot))
{
inC[0] = r * 257;
inC[1] = g * 257;
inC[2] = b * 257;
cmsDoTransform(stdTransRGBMonG, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
}
#endif
return QColor(r, g, b);
}
 
QColor ScColor::getDisplayColor(int c, int m, int y, int k)
{
int r = 0, g = 0, b = 0;
#ifdef HAVE_CMS
WORD inC[4];
WORD outC[4];
bool alert = true;
if ((CMSuse && CMSavail) && (!Spot))
{
inC[0] = c * 257;
inC[1] = m * 257;
inC[2] = y * 257;
inC[3] = k * 257;
cmsDoTransform(stdTransCMYKMonG, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
}
else
{
#endif
r = 255 - QMIN(255, c + k);
g = 255 - QMIN(255, m + k);
b = 255 - QMIN(255, y + k);
#ifdef HAVE_CMS
}
#endif
return QColor(r, g, b);
}
 
bool ScColor::isRegistrationColor()
{
return Regist;
/branches/Version13x/Scribus/scribus/scribusdoc.h
740,7 → 740,8
cmsHPROFILE DocInputCMYKProf;
cmsHPROFILE DocOutputProf;
cmsHPROFILE DocPrinterProf;
cmsHTRANSFORM stdTrans;
cmsHTRANSFORM stdTransRGBMon;
cmsHTRANSFORM stdTransCMYKMon;
cmsHTRANSFORM stdProof;
cmsHTRANSFORM stdTransImg;
cmsHTRANSFORM stdProofImg;
/branches/Version13x/Scribus/scribus/scimage.cpp
13,7 → 13,8
#include CMS_INC
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransG;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
/branches/Version13x/Scribus/scribus/scpainterex_gdi.cpp
132,7 → 132,7
QColor ScPainterEx_GDI::transformColor( ScColorShade& colorShade, double trans )
{
QColor c, color;
c = colorShade.color.getShadeColorProof( colorShade.shade );
c = colorShade.color.getShadeColor( colorShade.shade );
color = qRgba( qRed(c.rgb()), qGreen(c.rgb()), qBlue(c.rgb()), qAlpha(trans * 255));
if ( toGray )
{
/branches/Version13x/Scribus/scribus/scribus.cpp
183,7 → 183,8
#ifdef HAVE_CMS
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransG;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
2071,7 → 2072,8
IntentColors = doc->IntentColors;
IntentImages = doc->IntentImages;
stdProofG = doc->stdProof;
stdTransG = doc->stdTrans;
stdTransRGBMonG = doc->stdTransRGBMon;
stdTransCMYKMonG = doc->stdTransCMYKMon;
stdProofImgG = doc->stdProofImg;
stdTransImgG = doc->stdTransImg;
stdProofCMYKG = doc->stdProofCMYK;
3345,7 → 3347,8
{
CMSuse = doc->CMSSettings.CMSinUse;
stdProofG = doc->stdProof;
stdTransG = doc->stdTrans;
stdTransRGBMonG = doc->stdTransRGBMon;
stdTransCMYKMonG = doc->stdTransCMYKMon;
stdProofImgG = doc->stdProofImg;
stdTransImgG = doc->stdTransImg;
stdProofCMYKG = doc->stdProofCMYK;
/branches/Version13x/Scribus/scribus/cmykfw.cpp
39,11 → 39,11
orig.checkGamut();
alertIcon = loadIcon("alert.png");
imageA = QPixmap(50,50);
imageA.fill(orig.getRawRGBColor());
imageA.fill(orig.getDisplayColor());
if (orig.isOutOfGamut())
paintAlert(alertIcon,imageA, 2, 2, false);
imageN = QPixmap(50,50);
imageN.fill(orig.getRawRGBColor());
imageN.fill(orig.getDisplayColor());
if (orig.isOutOfGamut())
paintAlert(alertIcon, imageN, 2, 2, false);
Farbe = orig;
459,13 → 459,13
switch (farbe)
{
case 180:
tmp = ScColor(x, m, y, k).getRGBColor();
tmp = ScColor(x, m, y, k).getDisplayColorGC();
break;
case 300:
tmp = ScColor(c, x, y, k).getRGBColor();
tmp = ScColor(c, x, y, k).getDisplayColorGC();
break;
case 60:
tmp = ScColor(c, m, x, k).getRGBColor();
tmp = ScColor(c, m, x, k).getDisplayColorGC();
break;
}
p.setBrush(tmp);
475,13 → 475,13
switch (farbe)
{
case 180:
tmp = ScColor(x, 0, 0, 0).getRGBColor();
tmp = ScColor(x, 0, 0, 0).getDisplayColorGC();
break;
case 300:
tmp = ScColor(0, x, 0, 0).getRGBColor();
tmp = ScColor(0, x, 0, 0).getDisplayColorGC();
break;
case 60:
tmp = ScColor(0, 0, x, 0).getRGBColor();
tmp = ScColor(0, 0, x, 0).getDisplayColorGC();
break;
}
p.setBrush(tmp);
495,13 → 495,13
switch (farbe)
{
case 0:
tmp = ScColor(x, g, b).getRGBColor();
tmp = ScColor(x, g, b).getDisplayColorGC();
break;
case 120:
tmp = ScColor(r, x, b).getRGBColor();
tmp = ScColor(r, x, b).getDisplayColorGC();
break;
case 240:
tmp = ScColor(r, g, x).getRGBColor();
tmp = ScColor(r, g, x).getDisplayColorGC();
break;
}
p.setBrush(tmp);
511,13 → 511,13
switch (farbe)
{
case 0:
tmp = ScColor(x, 0, 0).getRGBColor();
tmp = ScColor(x, 0, 0).getDisplayColorGC();
break;
case 120:
tmp = ScColor(0, x, 0).getRGBColor();
tmp = ScColor(0, x, 0).getDisplayColorGC();
break;
case 240:
tmp = ScColor(0, 0, x).getRGBColor();
tmp = ScColor(0, 0, x).getDisplayColorGC();
break;
}
p.setBrush(tmp);
541,9 → 541,9
for (int x = 0; x < 255; x += 5)
{
if (dynamic)
p.setBrush(ScColor(c, m, y, x).getRGBColor());
p.setBrush(ScColor(c, m, y, x).getDisplayColorGC());
else
p.setBrush(ScColor(0, 0, 0, x).getRGBColor());
p.setBrush(ScColor(0, 0, 0, x).getDisplayColorGC());
p.drawRect(x, 0, 5, 10);
val -= 5;
}
664,7 → 664,7
QPixmap pm = QPixmap(30, 15);
for (it = CurrSwatch.begin(); it != CurrSwatch.end(); ++it)
{
pm.fill(CurrSwatch[it.key()].getRGBColor());
pm.fill(CurrSwatch[it.key()].getDisplayColor());
ColorSwatch->insertItem(pm, it.key());
}
ColorSwatch->setSelected(ColorSwatch->currentItem(), false);
810,6 → 810,10
Farbe.setColorModel(colorModelRGB);
setValues();
}
imageN.fill(Farbe.getDisplayColor());
if (Farbe.isOutOfGamut())
paintAlert(alertIcon, imageN, 2, 2, false);
NewC->setPixmap( imageN );
connect( CyanSp, SIGNAL( valueChanged(int) ), CyanSL, SLOT( setValue(int) ) );
connect( MagentaSp, SIGNAL( valueChanged(int) ), MagentaSL, SLOT( setValue(int) ) );
connect( YellowSp, SIGNAL( valueChanged(int) ), YellowSL, SLOT( setValue(int) ) );
882,7 → 886,7
YellowP->setPixmap(SliderPix(240));
}
}
imageN.fill(tmp.getRawRGBColor());
imageN.fill(tmp.getDisplayColor());
tmp.checkGamut();
if (tmp.isOutOfGamut())
paintAlert(alertIcon, imageN, 2, 2, false);
903,7 → 907,7
if (CMYKmode)
tmp.setColorModel(colorModelCMYK);
tmp.checkGamut();
imageN.fill(tmp.getRawRGBColor());
imageN.fill(tmp.getDisplayColor());
if (tmp.isOutOfGamut())
paintAlert(alertIcon, imageN, 2, 2, false);
NewC->setPixmap( imageN );
918,7 → 922,7
if (CMYKmode)
tmp.setColorModel(colorModelCMYK);
tmp.checkGamut();
imageN.fill(tmp.getRawRGBColor());
imageN.fill(tmp.getDisplayColor());
if (tmp.isOutOfGamut())
paintAlert(alertIcon, imageN, 2, 2, false);
NewC->setPixmap( imageN );
/branches/Version13x/Scribus/scribus/colorm.cpp
54,7 → 54,7
int itemHeight = height( listBox() );
int yPos;
 
QColor rgb = color.getRawRGBColor();
QColor rgb = color.getDisplayColor();
smallPix.fill(rgb);
QPainter painter(&smallPix);
painter.setBrush(Qt::NoBrush);
96,7 → 96,7
int itemHeight = height( listBox() );
int yPos;
 
QColor rgb = color.getRawRGBColor();
QColor rgb = color.getDisplayColor();
widePix.fill(rgb);
 
QRect rect;
149,7 → 149,7
int itemHeight = height( listBox() );
int yPos;
 
QColor rgb = color.getRawRGBColor();
QColor rgb = color.getDisplayColor();
smallPix.fill(rgb);
QPainter painter(&smallPix);
painter.setBrush(Qt::NoBrush);