24 #ifndef DIGIKAM_DCOLOR_H
25 #define DIGIKAM_DCOLOR_H
61 explicit DColor(uchar* data,
bool sixteenBit =
false)
63 setColor(data, sixteenBit);
69 DColor(
int red,
int green,
int blue,
int alpha,
bool sixteenBit)
74 m_sixteenBit (sixteenBit)
81 explicit DColor(
const QColor& color,
bool sixteenBit=
false);
91 inline void setColor(uchar*
const data,
bool sixteenBit =
false);
99 inline void setPixel(uchar*
const data)
const;
148 m_sixteenBit = sixteenBit;
151 QColor getQColor()
const;
155 return ((m_red == v) && (m_green == v) && (m_blue == v));
160 return ((m_red == m_green) && (m_red == m_blue));
167 void convertToSixteenBit();
168 void convertToEightBit();
183 void getHSL(
int*
const h,
int*
const s,
int*
const l)
const;
192 void setHSL(
int h,
int s,
int l,
bool sixteenBit);
199 void getYCbCr(
double*
const y,
double*
const cb,
double*
const cr)
const;
208 void setYCbCr(
double y,
double cb,
double cr,
bool sixteenBit);
227 inline void blendZero();
228 inline void blendAlpha8(
int alpha);
229 inline void blendInvAlpha8(
int alpha);
230 inline void blendAlpha16(
int alpha);
231 inline void blendInvAlpha16(
int alpha);
232 inline void premultiply16(
int alpha);
233 inline void premultiply8(
int alpha);
234 inline void demultiply16(
int alpha);
235 inline void demultiply8(
int alpha);
236 inline void blendAdd(
const DColor& src);
237 inline void blendClamp8();
238 inline void blendClamp16();
239 inline void multiply(
float factor);
bool isPureGray()
Definition: dcolor.h:158
int green() const
Definition: dcolor.h:106
void setGreen(int green)
Definition: dcolor.h:131
void setAlpha(int alpha)
Definition: dcolor.h:141
void setRed(int red)
Definition: dcolor.h:126
DColor(int red, int green, int blue, int alpha, bool sixteenBit)
Definition: dcolor.h:69
void setSixteenBit(bool sixteenBit)
Definition: dcolor.h:146
bool sixteenBit() const
Definition: dcolor.h:121
DColor(uchar *data, bool sixteenBit=false)
Definition: dcolor.h:61
void setBlue(int blue)
Definition: dcolor.h:136
DColor()
Definition: dcolor.h:49
int alpha() const
Definition: dcolor.h:116
int blue() const
Definition: dcolor.h:111
bool isPureGrayValue(int v)
Definition: dcolor.h:153
int red() const
Definition: dcolor.h:101
Definition: datefolderview.cpp:43