the class to store a color More...
#include <libstaroffice_internal.hxx>
Public Member Functions | |
| STOFFColor (uint32_t argb=0) | |
| constructor More... | |
| STOFFColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255) | |
| constructor from color More... | |
| STOFFColor & | operator= (uint32_t argb) |
| operator= More... | |
| uint32_t | value () const |
| return the rgba value More... | |
| unsigned char | getAlpha () const |
| returns the alpha value More... | |
| void | setAlpha (unsigned char alpha) |
| reset the alpha value More... | |
| unsigned char | getBlue () const |
| returns the green value More... | |
| unsigned char | getRed () const |
| returns the red value More... | |
| unsigned char | getGreen () const |
| returns the green value More... | |
| bool | isBlack () const |
| return true if the color is black More... | |
| bool | isWhite () const |
| return true if the color is white More... | |
| bool | operator== (STOFFColor const &c) const |
| operator== More... | |
| bool | operator!= (STOFFColor const &c) const |
| operator!= More... | |
| bool | operator< (STOFFColor const &c) const |
| operator< More... | |
| bool | operator<= (STOFFColor const &c) const |
| operator<= More... | |
| bool | operator> (STOFFColor const &c) const |
| operator> More... | |
| bool | operator>= (STOFFColor const &c) const |
| operator>= More... | |
| std::string | str () const |
| print the color in the form #rrggbb More... | |
Static Public Member Functions | |
| static STOFFColor | colorFromCMYK (unsigned char c, unsigned char m, unsigned char y, unsigned char k) |
| return a color from a cmyk color ( basic) More... | |
| static STOFFColor | colorFromHSL (unsigned char H, unsigned char S, unsigned char L) |
| return a color from a hsl color (basic) More... | |
| static STOFFColor | black () |
| return the back color More... | |
| static STOFFColor | white () |
| return the white color More... | |
| static STOFFColor | barycenter (float alpha, STOFFColor const &colA, float beta, STOFFColor const &colB) |
| return alpha*colA+beta*colB More... | |
Protected Attributes | |
| uint32_t | m_value |
| the argb color More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, STOFFColor const &c) |
| operator<< in the form #rrggbb More... | |
the class to store a color
|
inlineexplicit |
constructor
|
inline |
constructor from color
|
static |
return alpha*colA+beta*colB
Referenced by StarGraphicStruct::StarBrush::getColor().
|
inlinestatic |
return the back color
Referenced by StarCharAttribute::addInitTo(), and StarGraphicAttribute::addInitTo().
|
inlinestatic |
return a color from a cmyk color ( basic)
|
inlinestatic |
return a color from a hsl color (basic)
|
inline |
returns the alpha value
|
inline |
returns the green value
|
inline |
returns the green value
|
inline |
returns the red value
|
inline |
return true if the color is black
Referenced by STOFFFont::addTo(), operator<<(), StarAttributeManager::readAttribute(), StarFileManager::readSVGDI(), and StarObjectText::readSWPageDef().
|
inline |
return true if the color is white
Referenced by STOFFSection::addTo(), operator<<(), StarGraphicStruct::operator<<(), StarObjectChart::readSCHAttributes(), and StarFileManager::readSVGDI().
|
inline |
operator!=
|
inline |
operator<
|
inline |
operator<=
|
inline |
operator=
|
inline |
operator==
|
inline |
operator>
|
inline |
operator>=
|
inline |
reset the alpha value
| std::string STOFFColor::str | ( | ) | const |
print the color in the form #rrggbb
Referenced by STOFFFont::addTo(), STOFFSection::addTo(), and StarGraphicAttribute::StarGAttributeBrush::addTo().
|
inline |
return the rgba value
Referenced by StarGraphicStruct::getBMPData().
|
inlinestatic |
return the white color
Referenced by StarGraphicAttribute::addInitTo(), and StarObjectSmallGraphicInternal::SDUDGraphicAnimation::SDUDGraphicAnimation().
|
friend |
operator<< in the form #rrggbb
|
protected |
the argb color
Referenced by barycenter(), operator<(), operator<<(), operator<=(), and operator==().