the class to store a color More...
#include <libwps_internal.h>
Public Member Functions | |
| WPSColor (uint32_t argb=0) | |
| constructor | |
| WPSColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255) | |
| constructor from color | |
| WPSColor & | operator= (uint32_t argb) |
| operator= | |
| uint32_t | value () const |
| return the rgba value | |
| unsigned char | getAlpha () const |
| returns the alpha value | |
| unsigned char | getBlue () const |
| returns the green value | |
| unsigned char | getRed () const |
| returns the red value | |
| unsigned char | getGreen () const |
| returns the green value | |
| bool | isBlack () const |
| return true if the color is black | |
| bool | isWhite () const |
| return true if the color is white | |
| bool | operator== (WPSColor const &c) const |
| operator== | |
| bool | operator!= (WPSColor const &c) const |
| operator!= | |
| bool | operator< (WPSColor const &c) const |
| operator< | |
| bool | operator<= (WPSColor const &c) const |
| operator<= | |
| bool | operator> (WPSColor const &c) const |
| operator> | |
| bool | operator>= (WPSColor const &c) const |
| operator>= | |
| std::string | str () const |
| print the color in the form #rrggbb | |
Static Public Member Functions | |
| static WPSColor | black () |
| return the back color | |
| static WPSColor | white () |
| return the white color | |
| static WPSColor | barycenter (float alpha, WPSColor const &colA, float beta, WPSColor const &colB) |
| return alpha*colA+beta*colB | |
Protected Attributes | |
| uint32_t | m_value |
| the argb color | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, WPSColor const &c) |
| operator<< in the form #rrggbb | |
the class to store a color
|
inlineexplicit |
constructor
Referenced by barycenter(), black(), operator!=(), operator<(), operator<<, operator<=(), operator=(), operator==(), operator>(), operator>=(), and white().
|
inline |
constructor from color
|
static |
return alpha*colA+beta*colB
Referenced by WPSGraphicStyle::Pattern::getAverageColor(), LotusStyleManager::readLineStyle(), WPS8Table::readMCLD(), WKS4Spreadsheet::readMsWorksStyle(), and WPS8TextStyle::readParagraph().
|
inlinestatic |
return the back color
Referenced by LotusStyleManagerInternal::ColorStyle::ColorStyle(), WPSGraphicStyle::GradientStop::GradientStop(), WPSGraphicStyle::Pattern::Pattern(), WPSGraphicStyle::Pattern::Pattern(), QuattroSpreadsheet::readCellProperty(), QuattroSpreadsheet::readCellStyle(), LotusSpreadsheet::readExtraRowFormats(), LotusStyleManager::readLineStyle(), WPS8Table::readMCLD(), WKS4Spreadsheet::readMsWorksStyle(), WPS8TextStyle::readParagraph(), QuattroSpreadsheet::readUserStyle(), LotusStyleManager::updateSurfaceStyle(), and WPSGraphicStyle::WPSGraphicStyle().
|
inline |
returns the alpha value
|
inline |
returns the green value
Referenced by DosWordParser::readPAP().
|
inline |
returns the green value
Referenced by DosWordParser::readPAP().
|
inline |
returns the red value
Referenced by DosWordParser::readPAP().
|
inline |
return true if the color is black
Referenced by LotusStyleManagerInternal::ColorStyle::operator<<, LotusStyleManagerInternal::LineStyle::operator<<, WPSBorder::operator<<, WPSFont::operator<<, WPSGraphicStyle::operator<<, WPSGraphicStyle::Pattern::operator<<, LotusSpreadsheet::readExtraRowFormats(), LotusStyleManager::readFontStyleF0(), and LotusGraph::readGraphic().
|
inline |
return true if the color is white
Referenced by LotusStyleManagerInternal::ColorStyle::operator<<, WPS4TextInternal::Font::operator<<, WPS8ParserInternal::Frame::operator<<, WPSCellFormat::operator<<, WPSGraphicStyle::operator<<, WPSGraphicStyle::Pattern::operator<<, WPSParagraph::operator<<, LotusStyleManager::readCellStyleD2Data(), and LotusStyleManager::readCellStyleE6().
|
inline |
operator!=
|
inline |
operator<
Referenced by operator>=().
|
inline |
operator<=
Referenced by operator>().
|
inline |
operator=
|
inline |
operator==
Referenced by operator!=().
|
inline |
operator>
|
inline |
operator>=
| std::string WPSColor::str | ( | ) | const |
print the color in the form #rrggbb
Referenced by WPSGraphicStyle::addTo().
|
inline |
return the rgba value
|
inlinestatic |
return the white color
Referenced by LotusStyleManagerInternal::ColorStyle::ColorStyle(), WPSGraphicStyle::Pattern::Pattern(), WPSGraphicStyle::Pattern::Pattern(), LotusStyleManager::readLineStyle(), WPS8Table::readMCLD(), WKS4Spreadsheet::readMsWorksStyle(), WPS8TextStyle::readParagraph(), and WPSGraphicStyle::WPSGraphicStyle().
|
friend |
operator<< in the form #rrggbb
|
protected |
the argb color
Referenced by barycenter(), getAlpha(), getBlue(), getGreen(), getRed(), isBlack(), isWhite(), operator<(), operator<<, operator<=(), operator=(), operator==(), value(), WPSColor(), and WPSColor().