digiKam
|
Public Member Functions | |
int | alpha () const |
void | blendAdd (const DColor &src) |
void | blendAlpha16 (int alpha) |
void | blendAlpha8 (int alpha) |
void | blendClamp16 () |
void | blendClamp8 () |
void | blendInvAlpha16 (int alpha) |
void | blendInvAlpha8 (int alpha) |
void | blendZero () |
int | blue () const |
void | convertToEightBit () |
void | convertToSixteenBit () |
DColor () | |
DColor (const QColor &color, bool sixteenBit=false) | |
DColor (int red, int green, int blue, int alpha, bool sixteenBit) | |
DColor (uchar *data, bool sixteenBit=false) | |
void | demultiply () |
void | demultiply16 (int alpha) |
void | demultiply8 (int alpha) |
void | getHSL (int *const h, int *const s, int *const l) const |
QColor | getQColor () const |
void | getYCbCr (double *const y, double *const cb, double *const cr) const |
int | green () const |
bool | isPureGray () |
bool | isPureGrayValue (int v) |
void | multiply (float factor) |
void | premultiply () |
void | premultiply16 (int alpha) |
void | premultiply8 (int alpha) |
int | red () const |
void | setAlpha (int alpha) |
void | setBlue (int blue) |
void | setColor (uchar *const data, bool sixteenBit=false) |
void | setGreen (int green) |
void | setHSL (int h, int s, int l, bool sixteenBit) |
void | setPixel (uchar *const data) const |
void | setRed (int red) |
void | setSixteenBit (bool sixteenBit) |
void | setYCbCr (double y, double cb, double cr, bool sixteenBit) |
bool | sixteenBit () const |
|
inline |
Initialize with default value, fully transparent eight bit black
|
inlineexplicit |
Read value from data. Equivalent to setColor()
|
inline |
Initialize with given RGBA values
|
explicit |
Read values from QColor, convert to sixteenBit of sixteenBit is true
References convertToSixteenBit(), and sixteenBit().
|
inline |
|
inline |
References alpha(), blue(), green(), red(), setAlpha(), setBlue(), setGreen(), and setRed().
Referenced by Digikam::DImg::getSubPixelColorFast().
|
inline |
References alpha(), blue(), green(), red(), setAlpha(), setBlue(), setGreen(), and setRed().
|
inline |
References alpha(), blue(), green(), red(), setAlpha(), setBlue(), setGreen(), and setRed().
|
inline |
References alpha(), blue(), green(), red(), setAlpha(), setBlue(), setGreen(), and setRed().
Referenced by demultiply(), and Digikam::DImg::getSubPixelColorFast().
|
inline |
References alpha(), blue(), green(), red(), setAlpha(), setBlue(), setGreen(), and setRed().
Referenced by demultiply(), and Digikam::DImg::getSubPixelColorFast().
|
inline |
References alpha(), blue(), green(), red(), setAlpha(), setBlue(), setGreen(), and setRed().
|
inline |
References alpha(), blue(), green(), red(), setAlpha(), setBlue(), setGreen(), and setRed().
|
inline |
Inline alpha blending helper functions. These functions are used by DColorComposer. Look at that code to learn how to use them for composition if you want to use them in optimized code.
References setAlpha(), setBlue(), setGreen(), and setRed().
|
inline |
Referenced by blendAdd(), blendAlpha16(), blendAlpha8(), blendClamp16(), blendClamp8(), blendInvAlpha16(), blendInvAlpha8(), demultiply16(), demultiply8(), Digikam::DImg::fill(), Digikam::FilmFilter::filterAction(), getHSL(), Digikam::DImg::getSubPixelColor(), Digikam::ImageLevels::levelsGrayToneAdjustByColors(), Digikam::ImageLevels::levelsInputFromColor(), multiply(), premultiply16(), premultiply8(), setPixel(), Digikam::CurvesSettings::slotSpotColorChanged(), and Digikam::EditorTool::slotUpdateSpotInfo().
void Digikam::DColor::convertToEightBit | ( | ) |
Referenced by Digikam::DImg::bitBlendImageOnColor(), and getQColor().
void Digikam::DColor::convertToSixteenBit | ( | ) |
Convert the color values of this color to and from sixteen bit and set the sixteenBit value accordingly
Referenced by Digikam::DImg::bitBlendImageOnColor(), DigikamEditorInsertTextToolPlugin::InsertTextWidget::composeImage(), and DColor().
|
inline |
References alpha(), blendClamp16(), blendClamp8(), demultiply16(), demultiply8(), and sixteenBit().
Referenced by Digikam::DColorComposer::compose().
|
inline |
References blue(), green(), red(), setBlue(), setGreen(), and setRed().
Referenced by demultiply().
|
inline |
References blue(), green(), red(), setBlue(), setGreen(), and setRed().
Referenced by demultiply().
void Digikam::DColor::getHSL | ( | int *const | h, |
int *const | s, | ||
int *const | l | ||
) | const |
QColor Digikam::DColor::getQColor | ( | ) | const |
References convertToEightBit(), and getQColor().
Referenced by getQColor().
void Digikam::DColor::getYCbCr | ( | double *const | y, |
double *const | cb, | ||
double *const | cr | ||
) | const |
Return the current RGB color values of this color in the YCrCb color space. Alpha is ignored for the conversion.
|
inline |
Referenced by blendAdd(), blendAlpha16(), blendAlpha8(), blendClamp16(), blendClamp8(), blendInvAlpha16(), blendInvAlpha8(), demultiply16(), demultiply8(), Digikam::DImg::fill(), Digikam::FilmFilter::filterAction(), getHSL(), Digikam::DImg::getSubPixelColor(), Digikam::ImageLevels::levelsGrayToneAdjustByColors(), Digikam::ImageLevels::levelsInputFromColor(), multiply(), premultiply16(), premultiply8(), setPixel(), Digikam::CurvesSettings::slotSpotColorChanged(), and Digikam::EditorTool::slotUpdateSpotInfo().
|
inline |
|
inline |
|
inline |
References alpha(), blue(), green(), red(), setAlpha(), setBlue(), setGreen(), and setRed().
Referenced by Digikam::DImg::getSubPixelColorFast().
|
inline |
Premultiply and demultiply this color. DImg stores the color non-premultiplied. Inline methods.
References alpha(), premultiply16(), premultiply8(), and sixteenBit().
Referenced by Digikam::DColorComposer::compose().
|
inline |
References blue(), green(), red(), setBlue(), setGreen(), and setRed().
Referenced by premultiply().
|
inline |
References blue(), green(), red(), setBlue(), setGreen(), and setRed().
Referenced by premultiply().
|
inline |
Referenced by blendAdd(), blendAlpha16(), blendAlpha8(), blendClamp16(), blendClamp8(), blendInvAlpha16(), blendInvAlpha8(), demultiply16(), demultiply8(), Digikam::DImg::fill(), Digikam::FilmFilter::filterAction(), getHSL(), Digikam::DImg::getSubPixelColor(), Digikam::ImageLevels::levelsGrayToneAdjustByColors(), Digikam::ImageLevels::levelsInputFromColor(), multiply(), premultiply16(), premultiply8(), setPixel(), Digikam::CurvesSettings::slotSpotColorChanged(), and Digikam::EditorTool::slotUpdateSpotInfo().
|
inline |
|
inline |
|
inline |
Read color values as RGBA from the given memory location. If sixteenBit is false, 4 bytes are read. If sixteenBit is true, 8 bytes are read. Inline method.
These methods are used in quite a few image effects, typically in loops iterating the data. Providing them as inline methods allows the compiler to optimize better.
References setAlpha(), setBlue(), setGreen(), setRed(), and sixteenBit().
Referenced by Digikam::DImg::getSubPixelColor(), and Digikam::DImg::getSubPixelColorFast().
|
inline |
void Digikam::DColor::setHSL | ( | int | h, |
int | s, | ||
int | l, | ||
bool | sixteenBit | ||
) |
Set the RGB color values of this color to the given HSL values converted to RGB. Alpha is set to be fully opaque. sixteenBit determines both how the HSL values are interpreted and the sixteenBit value of this color after this operation.
References sixteenBit().
|
inline |
Write the values of this color to the given memory location. If sixteenBit is false, 4 bytes are written. If sixteenBit is true, 8 bytes are written. Inline method.
References alpha(), blue(), green(), red(), and sixteenBit().
Referenced by Digikam::DImg::setPixelColor().
|
inline |
|
inline |
void Digikam::DColor::setYCbCr | ( | double | y, |
double | cb, | ||
double | cr, | ||
bool | sixteenBit | ||
) |
Set the RGB color values of this color to the given YCrCb values converted to RGB. Alpha is set to be fully opaque. sixteenBit determines both how the YCrCb values are interpreted and the sixteenBit value of this color after this operation.
References CLAMP, and sixteenBit().
|
inline |
Referenced by DColor(), demultiply(), Digikam::FilmFilter::filterAction(), premultiply(), setColor(), setHSL(), setPixel(), Digikam::DImg::setPixelColor(), and setYCbCr().