the class to store a color More...
#include <libmwaw_internal.hxx>
Public Member Functions | |
MWAWColor (uint32_t argb=0) | |
constructor More... | |
MWAWColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a=0) | |
constructor from color More... | |
MWAWColor & | operator= (uint32_t argb) |
operator= More... | |
uint32_t | value () const |
return the rgba 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== (MWAWColor const &c) const |
operator== More... | |
bool | operator!= (MWAWColor const &c) const |
operator!= More... | |
bool | operator< (MWAWColor const &c) const |
operator< More... | |
bool | operator<= (MWAWColor const &c) const |
operator<= More... | |
bool | operator> (MWAWColor const &c) const |
operator> More... | |
bool | operator>= (MWAWColor const &c) const |
operator>= More... | |
std::string | str () const |
print the color in the form #rrggbb More... | |
Static Public Member Functions | |
static MWAWColor | black () |
return the back color More... | |
static MWAWColor | white () |
return the white color More... | |
static MWAWColor | barycenter (float alpha, MWAWColor const &colA, float beta, MWAWColor 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, MWAWColor const &c) |
operator<< in the form #rrggbb More... | |
the class to store a color
|
inline |
constructor from color
|
static |
return alpha*colA+beta*colB
Referenced by MWAWGraphicStyle::Pattern::getAverageColor(), MRWTextInternal::Paragraph::BorderFill::getBackgroundColor(), MWProStructures::getColor(), HMWKGraphInternal::State::getColor(), HMWJGraphInternal::State::getColor(), LWText::readFont2(), MSKGraph::readPictHeader(), MRWGraph::sendRule(), and CWStyleManager::updateGradient().
|
inlinestatic |
return the back color
Referenced by CWStyleManagerInternal::Gradient::Gradient(), MWAWGraphicStyle::MWAWGraphicStyle(), CWStyleManagerInternal::Pattern::Pattern(), MRWGraphInternal::Pattern::Pattern(), MWAWGraphicStyle::Pattern::Pattern(), HMWKGraphInternal::Pattern::Pattern(), HMWJGraphInternal::Pattern::Pattern(), libmwaw_applepict1::OpCode::readColor(), MSWTextStyles::readFont(), CWStyleManager::readFont(), CWText::readFont(), LWText::readFont2(), HMWJGraph::readFrames(), GWGraph::readStyle(), HMWKGraph::readTable(), HMWJGraph::readTableFormatsList(), and MRWTextInternal::Paragraph::BorderFill::resetBackgroundColor().
|
inline |
return true if the color is black
Referenced by MRWTextInternal::Paragraph::BorderFill::hasBackgroundColor(), MRWGraphInternal::operator<<(), FWStruct::operator<<(), MRWTextInternal::operator<<(), operator<<(), MORStruct::operator<<(), MRWParser::readDocInfo(), MORParser::readDocumentInfo(), GWParser::readGrDS(), and MRWGraph::readToken().
|
inline |
return true if the color is white
Referenced by MWAWSection::addTo(), MWAWParagraph::addTo(), FWStruct::Border::addToFrame(), MWProStructuresInternal::Block::fillFramePropertyList(), MSKGraphInternal::TextBox::fillFramePropertyList(), MSKGraphInternal::TextBoxv4::fillFramePropertyList(), MWAWPageSpan::getPageProperty(), MRWTextInternal::Paragraph::BorderFill::hasBackgroundColor(), MWProStructuresInternal::Block::hasBorders(), MRWParserInternal::operator<<(), operator<<(), FWStruct::operator<<(), MRWTextInternal::operator<<(), MORStruct::operator<<(), MORParser::readDocumentInfo(), GWParser::readGrDS(), MRWParser::readZone13(), MSKTable::sendTable(), MSWText::sendTable(), and FWTextInternal::Paragraph::updateToSent().
|
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 MWAWColor::str | ( | ) | const |
print the color in the form #rrggbb
Referenced by MWAWSection::addTo(), MWAWParagraph::addTo(), HMWJGraphInternal::FrameFormat::addTo(), MWAWGraphicStyle::addTo(), HMWKGraphInternal::TextBox::addTo(), FWStruct::Border::addToFrame(), MWProStructuresInternal::Block::fillFramePropertyList(), MSKGraphInternal::TextBox::fillFramePropertyList(), MSKGraphInternal::TextBoxv4::fillFramePropertyList(), MWAWPageSpan::getPageProperty(), MORParser::readBackside(), HMWKText::readFont(), HMWKGraph::readTable(), HMWJGraph::sendComment(), CWGraph::sendGroupChild(), and GWGraph::sendTextbox().
|
inline |
return the rgba value
Referenced by getPPMData().
|
inlinestatic |
return the white color
Referenced by MWProStructures::getColor(), HMWKGraphInternal::State::getColor(), HMWJGraphInternal::State::getColor(), BWTextInternal::Font::getFont(), CWStyleManagerInternal::Gradient::Gradient(), MWAWGraphicStyle::MWAWGraphicStyle(), CWStyleManagerInternal::Pattern::Pattern(), MRWGraphInternal::Pattern::Pattern(), MWAWGraphicStyle::Pattern::Pattern(), HMWKGraphInternal::Pattern::Pattern(), HMWJGraphInternal::Pattern::Pattern(), MWProStructures::readBlock(), libmwaw_applepict1::OpCode::readColor(), LWText::readFont2(), HMWJGraph::readFrames(), GWGraph::readStyle(), HMWKGraph::readTable(), HMWJGraph::readTableFormatsList(), MRWTextInternal::Paragraph::BorderFill::resetBackgroundColor(), and MRWGraph::sendRule().
|
friend |
operator<< in the form #rrggbb
|
protected |
the argb color
Referenced by barycenter(), isBlack(), isWhite(), operator<(), operator<<(), operator<=(), operator=(), operator==(), and value().