|
constexpr | Color () |
|
constexpr | Color (const sal_uInt32 nColor) |
|
constexpr | Color (enum ColorTransparencyTag, sal_uInt32 nColor) |
|
constexpr | Color (enum ColorAlphaTag, sal_uInt32 nColor) |
|
constexpr | Color (enum ColorTransparencyTag, sal_uInt8 nTransparency, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue) |
|
constexpr | Color (enum ColorAlphaTag, sal_uInt8 nAlpha, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue) |
|
constexpr | Color (sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue) |
|
| Color (const basegfx::BColor &rBColor) |
|
constexpr | operator sal_uInt32 () const |
| Casts the color to corresponding uInt32. More...
|
|
constexpr | operator sal_Int32 () const |
| Casts the color to corresponding iInt32. More...
|
|
sal_uInt8 | GetRed () const |
| Gets the red value. More...
|
|
sal_uInt8 | GetGreen () const |
| Gets the green value. More...
|
|
sal_uInt8 | GetBlue () const |
| Gets the blue value. More...
|
|
sal_uInt8 | GetAlpha () const |
| Gets the alpha value. More...
|
|
bool | IsTransparent () const |
| Is the color transparent? More...
|
|
bool | IsFullyTransparent () const |
| Is the color fully transparent i.e. More...
|
|
void | SetRed (sal_uInt8 nRed) |
| Sets the red value. More...
|
|
void | SetGreen (sal_uInt8 nGreen) |
| Sets the green value. More...
|
|
void | SetBlue (sal_uInt8 nBlue) |
| Sets the blue value. More...
|
|
void | SetAlpha (sal_uInt8 nAlpha) |
| Sets the alpha value. More...
|
|
Color | GetRGBColor () const |
| Returns the same color but ignoring the transparency value. More...
|
|
bool | IsRGBEqual (const Color &rColor) const |
| Check if the color RGB value is equal than rColor. More...
|
|
bool | operator< (const Color &aCompareColor) const |
| Check if the color value is lower than aCompareColor. More...
|
|
bool | operator> (const Color &aCompareColor) const |
| Check if the color value is greater than aCompareColor. More...
|
|
bool | operator== (const Color &rColor) const |
| Check if the color value is equal than rColor. More...
|
|
bool | operator!= (const Color &rColor) const |
| Check if the color value is unequal than rColor. More...
|
|
sal_uInt16 | GetColorError (const Color &rCompareColor) const |
| Gets the color error compared to another. More...
|
|
sal_uInt8 | GetLuminance () const |
| Gets the color luminance. More...
|
|
void | IncreaseLuminance (sal_uInt8 cLumInc) |
| Increases the color luminance by cLumInc. More...
|
|
void | DecreaseLuminance (sal_uInt8 cLumDec) |
| Decreases the color luminance by cLumDec. More...
|
|
void | DecreaseContrast (sal_uInt8 cContDec) |
| Decreases color contrast with white by cContDec. More...
|
|
bool | IsDark () const |
| Comparison with luminance thresholds. More...
|
|
bool | IsBright () const |
| Comparison with luminance thresholds. More...
|
|
void | ApplyTintOrShade (sal_Int16 n100thPercent) |
| Apply tint or shade to a color. More...
|
|
void | ApplyLumModOff (sal_Int16 nMod, sal_Int16 nOff) |
| Apply luminance offset and/or modulation. More...
|
|
void | Invert () |
| Inverts color. More...
|
|
void | Merge (const Color &rMergeColor, sal_uInt8 cTransparency) |
| Merges color with rMergeColor. More...
|
|
void | RGBtoHSB (sal_uInt16 &nHue, sal_uInt16 &nSaturation, sal_uInt16 &nBrightness) const |
| Color space conversion tools. More...
|
|
OUString | AsRGBHexString () const |
|
OUString | AsRGBHEXString () const |
|
basegfx::BColor | getBColor () const |
|
Definition at line 50 of file color.hxx.
void Color::ApplyTintOrShade |
( |
sal_Int16 |
n100thPercent | ) |
|
Apply tint or shade to a color.
The input value is the percentage (in 100th of percent) of how much the color changes towards the black (shade) or white (tint). If the value is positive, the color is tinted, if the value is negative, the color is shaded.
Definition at line 208 of file color.cxx.
References abs(), B, G, getBColor(), basegfx::BColor::getBlue(), basegfx::BColor::getGreen(), basegfx::BColor::getRed(), basegfx::utils::hsl2rgb(), R, basegfx::utils::rgb2hsl(), and basegfx::BColor::setBlue().
void Color::Merge |
( |
const Color & |
rMergeColor, |
|
|
sal_uInt8 |
cTransparency |
|
) |
| |
|
inline |
Merges color with rMergeColor.
Allows to get resulting color when superposing another.
- Parameters
-
rMergeColor | |
cTransparency | |
Definition at line 362 of file color.hxx.
References B, B, color::ColorChannelMerge(), G, G, R, and R.