WPSColor Struct Reference documentation

WPSColor Struct Reference

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 (WPSColor const &)=default
| copy constructor
| WPSColor (WPSColor &&)=default
| move assignement
WPSColor & | operator= (uint32_t argb)
| operator=
WPSColor & | operator= (WPSColor const &)=default
| operator=
WPSColor & | operator= (WPSColor &&)=default
| move 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

## Detailed Description

the class to store a color

## Constructor & Destructor Documentation

## ◆ WPSColor() [1/4]

WPSColor::WPSColor | ( | uint32_t | argb = 0 | ) |
| inlineexplicit

constructor

Referenced by barycenter(), black(), operator!=(), operator<(), operator<<, operator<=(), operator=(), operator=(), operator=(), operator==(), operator>(), operator>=(), white(), WPSColor(), and WPSColor().

## ◆ WPSColor() [2/4]

WPSColor::WPSColor | ( | unsigned char | r,
|  | unsigned char | g,
|  | unsigned char | b,
|  | unsigned char | a = 255 )
| inline

constructor from color

## ◆ WPSColor() [3/4]

WPSColor::WPSColor | ( | WPSColor const & |  | ) |
| default

copy constructor

## ◆ WPSColor() [4/4]

WPSColor::WPSColor | ( | WPSColor && |  | ) |
| default

move assignement

## Member Function Documentation

## ◆ barycenter()

WPSColor WPSColor::barycenter | ( | float | alpha,
|  | WPSColor const & | colA,
|  | float | beta,
|  | WPSColor const & | colB )
| static

return alpha*colA+beta*colB

Referenced by WPSGraphicStyle::Pattern::getAverageColor(), QuattroSpreadsheet::readCellStyle(), LotusStyleManager::readLineStyle(), WPS8Table::readMCLD(), WKS4Spreadsheet::readMsWorksStyle(), WPS8TextStyle::readParagraph(), QuattroGraph::readShapeHeader(), and QuattroGraph::readTextBox().

## ◆ black()

WPSColor WPSColor::black | ( |  | ) |
| inlinestatic

return the back color

Referenced by LotusStyleManagerInternal::ColorStyle::ColorStyle(), WPSGraphicStyle::GradientStop::GradientStop(), WPSGraphicStyle::Pattern::Pattern(), WPSGraphicStyle::Pattern::Pattern(), QuattroDosSpreadsheet::readCellProperty(), QuattroDosSpreadsheet::readCellStyle(), QuattroSpreadsheet::readCellStyle(), Quattro9Spreadsheet::readCellStyles(), QuattroDosChart::readChart(), LotusSpreadsheet::readExtraRowFormats(), LotusChart::readFramesStyle(), LotusStyleManager::readLineStyle(), WPS8Table::readMCLD(), WKS4Spreadsheet::readMsWorksStyle(), WPS8TextStyle::readParagraph(), LotusChart::readSerie(), Quattro9Graph::readShapeRec(), QuattroDosSpreadsheet::readUserStyle(), LotusStyleManager::updateSurfaceStyle(), and WPSGraphicStyle::WPSGraphicStyle().

## ◆ getAlpha()

unsigned char WPSColor::getAlpha | ( |  | ) | const
| inline

returns the alpha value

## ◆ getBlue()

unsigned char WPSColor::getBlue | ( |  | ) | const
| inline

returns the green value

Referenced by DosWordParser::readPAP().

## ◆ getGreen()

unsigned char WPSColor::getGreen | ( |  | ) | const
| inline

returns the green value

Referenced by DosWordParser::readPAP().

## ◆ getRed()

unsigned char WPSColor::getRed | ( |  | ) | const
| inline

returns the red value

Referenced by DosWordParser::readPAP().

## ◆ isBlack()

bool WPSColor::isBlack | ( |  | ) | const
| 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<<, Quattro9Spreadsheet::readCellStyles(), LotusSpreadsheet::readExtraRowFormats(), LotusStyleManager::readFontStyleF0(), Quattro9Graph::readFrameHeader(), LotusChart::readFramesStyle(), LotusGraph::readGraphic(), QuattroParser::readPaneAttribute(), and Quattro9Graph::readShapeRec().

## ◆ isWhite()

bool WPSColor::isWhite | ( |  | ) | const
| 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(), LotusStyleManager::readCellStyleE6(), Quattro9Spreadsheet::readCellStyles(), Quattro9Graph::readFrameHeader(), LotusChart::readFramesStyle(), and Quattro9Graph::readTextboxStyle().

## ◆ operator!=()

bool WPSColor::operator!= | ( | WPSColor const & | c | ) | const
| inline

operator!=

## ◆ operator<()

bool WPSColor::operator< | ( | WPSColor const & | c | ) | const
| inline

operator<

Referenced by operator>=().

## ◆ operator<=()

bool WPSColor::operator<= | ( | WPSColor const & | c | ) | const
| inline

operator<=

Referenced by operator>().

## ◆ operator=() [1/3]

WPSColor & WPSColor::operator= | ( | uint32_t | argb | ) |
| inline

operator=

## ◆ operator=() [2/3]

WPSColor & WPSColor::operator= | ( | WPSColor && |  | ) |
| default

move operator=

## ◆ operator=() [3/3]

WPSColor & WPSColor::operator= | ( | WPSColor const & |  | ) |
| default

operator=

## ◆ operator==()

bool WPSColor::operator== | ( | WPSColor const & | c | ) | const
| inline

operator==

Referenced by operator!=().

## ◆ operator>()

bool WPSColor::operator> | ( | WPSColor const & | c | ) | const
| inline

operator>

## ◆ operator>=()

bool WPSColor::operator>= | ( | WPSColor const & | c | ) | const
| inline

operator>=

## ◆ str()

std::string WPSColor::str | ( |  | ) | const

print the color in the form #rrggbb

Referenced by WPSGraphicStyle::addTo().

## ◆ value()

uint32_t WPSColor::value | ( |  | ) | const
| inline

return the rgba value

## ◆ white()

WPSColor WPSColor::white | ( |  | ) |
| inlinestatic

return the white color

Referenced by LotusStyleManagerInternal::ColorStyle::ColorStyle(), WPSGraphicStyle::Pattern::Pattern(), WPSGraphicStyle::Pattern::Pattern(), QuattroSpreadsheet::readCellStyle(), Quattro9Spreadsheet::readCellStyles(), QuattroDosChart::readChart(), LotusChart::readFramesStyle(), LotusStyleManager::readLineStyle(), WPS8Table::readMCLD(), WKS4Spreadsheet::readMsWorksStyle(), WPS8TextStyle::readParagraph(), LotusChart::readSerie(), Quattro9Graph::readShapeRec(), WKS4Chart::updateChart(), and WPSGraphicStyle::WPSGraphicStyle().

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | o,
|  | WPSColor const & | c )
| friend

operator<< in the form #rrggbb

## Member Data Documentation

## ◆ m_value

uint32_t WPSColor::m_value
| protected

the argb color

Referenced by barycenter(), getAlpha(), getBlue(), getGreen(), getRed(), isBlack(), isWhite(), operator<(), operator<<, operator<=(), operator=(), operator==(), value(), WPSColor(), and WPSColor().

The documentation for this struct was generated from the following files:

- libwps_internal.h
- libwps_internal.cpp