Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4607 → Rev 4608

/branches/Version13x/Scribus/scribus/sccolor.h
55,6 → 55,9
* in the range from 0 - 255 */
ScColor(int r, int g, int b);
~ScColor() {};
bool operator==(const ScColor& rhs) const;
/** flag to enable and disable use of color management (default: true) */
static bool UseProf;
 
/branches/Version13x/Scribus/scribus/sccolor.cpp
72,6 → 72,25
Regist = false;
}
 
bool ScColor::operator==(const ScColor& rhs) const
{
if (Model!=rhs.Model)
return false;
if (Spot!=rhs.Spot)
return false;
if (Regist!=rhs.Regist)
return false;
if (Model==colorModelRGB)
{
return (R==rhs.R && G==rhs.G && B==rhs.B);
}
if (Model==colorModelCMYK)
{
return (C==rhs.C && M==rhs.M && Y==rhs.Y && K==rhs.K);
}
return false;
}
 
void ScColor::setColor(int c, int m, int y, int k)
{
C = c;
/branches/Version13x/Scribus/scribus/cmykfw.cpp
628,11 → 628,18
if ((n<customSetStartIndex) && (Cname.length()==0))
{
Cname=QString("#%1%2%3").arg(Rval,2,16).arg(Gval,2,16).arg(Bval,2,16).upper();
if (!cus)
Cname=QString("#%1%2%3").arg(Rval,2,16).arg(Gval,2,16).arg(Bval,2,16).upper();
else
Cname=QString("#%1%2%3%4").arg(Rval,2,16).arg(Gval,2,16).arg(Bval,2,16).arg(Kval,2,16).upper();
Cname.replace(" ","0");
}
if (CurrSwatch.contains(Cname))
{
if (tmp==CurrSwatch[Cname])
continue;
Cname=QString("%1%2").arg(Cname).arg(CurrSwatch.count());
}
CurrSwatch.insert(Cname, tmp);
}
/branches/Version13x/Scribus/scribus/colorm.cpp
308,6 → 308,8
{
ScColor tmp;
ColorEn = tsC.readLine();
if (ColorEn.length()>0 && ColorEn[0]==QChar('#'))
continue;
QTextStream CoE(&ColorEn, IO_ReadOnly);
CoE >> Rval;
CoE >> Gval;
325,11 → 327,18
}
if ((c<customSetStartIndex) && (Cname.length()==0))
{
Cname=QString("#%1%2%3").arg(Rval,2,16).arg(Gval,2,16).arg(Bval,2,16).upper();
if (!cus)
Cname=QString("#%1%2%3").arg(Rval,2,16).arg(Gval,2,16).arg(Bval,2,16).upper();
else
Cname=QString("#%1%2%3%4").arg(Rval,2,16).arg(Gval,2,16).arg(Bval,2,16).arg(Kval,2,16).upper();
Cname.replace(" ","0");
}
if (EditColors.contains(Cname))
{
if (tmp==EditColors[Cname])
continue;
Cname=QString("%1%2").arg(Cname).arg(EditColors.count());
}
EditColors.insert(Cname, tmp);
}
fiC.close();