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=255) | |
constructor from color More... | |
MWAWColor & | operator= (uint32_t argb) |
operator= More... | |
uint32_t | value () const |
return the rgba value More... | |
unsigned char | getAlpha () const |
returns 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== (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 | colorFromCMYK (unsigned char c, unsigned char m, unsigned char y, unsigned char k) |
return a color from a cmyk color ( basic) More... | |
static MWAWColor | colorFromHSL (unsigned char H, unsigned char S, unsigned char L) |
return a color from a hsl color (basic) More... | |
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
|
inline |
constructor from color
|
static |
return alpha*colA+beta*colB
Referenced by MWAWGraphicStyle::Pattern::getAverageColor(), MarinerWrtTextInternal::Paragraph::BorderFill::getBackgroundColor(), MacWrtProStructures::getColor(), HanMacWrdKGraphInternal::State::getColor(), HanMacWrdJGraphInternal::State::getColor(), RagTime5StyleManager::getLineColor(), RagTimeParser::readColorTable(), RagTimeParser::readDataZoneHeader(), LightWayTxtText::readFont2(), MacDrawProParser::readObject(), MsWksGraph::readPictHeader(), WingzParser::readSpreadsheetStyle(), MarinerWrtGraph::sendRule(), RagTime5StyleManager::updateBorderStyle(), ClarisDrawStyleManager::updateGradient(), and ClarisWksStyleManager::updateGradient().
|
inlinestatic |
return the back color
Referenced by RagTimeParser::createZones(), MacDraft5StyleManagerInternal::Pixmap::get(), BeagleWksSSParserInternal::State::getColor(), ClarisDrawStyleManagerInternal::Gradient::Gradient(), ClarisWksStyleManagerInternal::Gradient::Gradient(), RagTime5StyleManager::GraphicStyle::GraphicStyle(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawProStyleManagerInternal::State::initColors(), RagTime5StyleManagerInternal::State::initColorsList(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), MWAWGraphicStyle::MWAWGraphicStyle(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::Pattern::Pattern(), MWAWGraphicStyle::Pattern::Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), HanMacWrdJGraphInternal::Pattern::Pattern(), RagTime5StyleManager::GraphicStyle::read(), MacPaintParser::readBitmap(), SuperPaintParser::readBitmap(), BeagleWksBMParser::readBitmap(), ApplePictParser::readBWPattern(), MacDrawProStyleManager::readBWPatterns(), libmwaw_applepict1::OpCode::readColor(), ApplePictParser::readColorPattern(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), RagTimeParser::readDataZoneHeader(), MsWrdTextStyles::readFont(), ClarisWksStyleManager::readFont(), ClarisWksText::readFont(), LightWayTxtText::readFont2(), HanMacWrdJGraph::readFrames(), MacDrawProParser::readObject(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), MacDraft5StyleManager::readPatterns(), SuperPaintParser::readShape(), GreatWksGraph::readStyle(), HanMacWrdKGraph::readTable(), HanMacWrdJGraph::readTableFormatsList(), ApplePictParser::readZone(), MarinerWrtTextInternal::Paragraph::BorderFill::resetBackgroundColor(), MWAWFont::resetColor(), MacDrawProParser::send(), MacDrawParser::sendBitmap(), MacDraftParser::sendBitmap(), MacDrawProParser::sendBitmap(), ClarisDrawGraph::sendGroup(), and ClarisDrawGraph::sendMainGroupChild().
|
inlinestatic |
return a color from a cmyk color ( basic)
Referenced by MacDrawProStyleManager::readColorMap(), MacDrawProStyleManager::readColorPalette(), and MacDrawProStyleManager::readGradientPalette().
|
inlinestatic |
return a color from a hsl color (basic)
Referenced by MacDrawProStyleManager::readColorMap(), and MacDrawProStyleManager::readColorPalette().
|
inline |
returns the alpha value
|
inline |
returns the green value
Referenced by MacDraft5StyleManagerInternal::Pixmap::get(), MacDrawProStyleManager::readColorPatterns(), MacDrawProParser::readObject(), and RagTime5StyleManager::updateBorderStyle().
|
inline |
returns the green value
Referenced by MacDraft5StyleManagerInternal::Pixmap::get(), MacDrawProStyleManager::readColorPatterns(), and RagTime5StyleManager::updateBorderStyle().
|
inline |
returns the red value
Referenced by MacDraft5StyleManagerInternal::Pixmap::get(), MacDrawProStyleManager::readColorPatterns(), and RagTime5StyleManager::updateBorderStyle().
|
inline |
return true if the color is black
Referenced by MWAWFont::hasColor(), RagTimeParserInternal::operator<<(), MarinerWrtGraphInternal::operator<<(), FullWrtStruct::operator<<(), MarinerWrtTextInternal::operator<<(), operator<<(), MoreStruct::operator<<(), MarinerWrtParser::readDocInfo(), MoreParser::readDocumentInfo(), GreatWksDocument::readGrDS(), MacDrawProParser::readObject(), GreatWksSSParser::readStyles(), MarinerWrtGraph::readToken(), and MacDraft5StyleManager::updateLineStyle().
|
inline |
return true if the color is white
Referenced by FullWrtStruct::Border::addTo(), MWAWSection::addTo(), MWAWParagraph::addTo(), MWAWFont::addTo(), MacWrtProStructuresInternal::Block::fillFrame(), MWAWFont::getDebugString(), MWAWPageSpan::getPageProperty(), MacWrtProStructuresInternal::Block::hasBorders(), MarinerWrtParserInternal::operator<<(), FullWrtStruct::operator<<(), MarinerWrtTextInternal::operator<<(), operator<<(), MoreStruct::operator<<(), RagTimeParser::readDataZoneHeader(), MoreParser::readDocumentInfo(), GreatWksDocument::readGrDS(), MacDrawProParser::readObject(), WingzParser::readSpreadsheetCellList(), WingzParser::readSpreadsheetStyle(), GreatWksSSParser::readStyles(), MarinerWrtParser::readZone13(), ClarisDrawGraph::sendGroup(), GreatWksSSParser::sendSpreadsheet(), ClarisWksSpreadsheet::sendSpreadsheet(), MsWksTable::sendTable(), MsWrdText::sendTable(), and MacDraft5StyleManager::updateSurfaceStyle().
|
inline |
operator!=
|
inline |
operator<
|
inline |
operator<=
|
inline |
operator=
|
inline |
operator==
|
inline |
operator>
|
inline |
operator>=
std::string MWAWColor::str | ( | ) | const |
print the color in the form #rrggbb
Referenced by MWAWGraphicStyle::addFrameTo(), MWAWFont::Line::addTo(), MWAWSection::addTo(), MWAWParagraph::addTo(), MWAWGraphicStyle::addTo(), MWAWFont::addTo(), MWAWPageSpan::getPageProperty(), MoreParser::readBackside(), MacDrawProStyleManager::readFontStyles(), and HanMacWrdKGraph::readTable().
|
inline |
return the rgba value
Referenced by MWAWPictBitmapInternal::getBMPData(), and MWAWPictBitmapInternal::getPPMData().
|
inlinestatic |
return the white color
Referenced by BeagleWksSSParserInternal::State::getColor(), MacWrtProStructures::getColor(), HanMacWrdKGraphInternal::State::getColor(), HanMacWrdJGraphInternal::State::getColor(), BeagleWksTextInternal::Font::getFont(), RagTime5StyleManager::getLineColor(), ClarisDrawStyleManagerInternal::Gradient::Gradient(), ClarisWksStyleManagerInternal::Gradient::Gradient(), RagTime5StyleManager::GraphicStyle::GraphicStyle(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawProStyleManagerInternal::State::initColors(), RagTime5StyleManagerInternal::State::initColorsList(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), MWAWGraphicStyle::MWAWGraphicStyle(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::Pattern::Pattern(), MWAWGraphicStyle::Pattern::Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), HanMacWrdJGraphInternal::Pattern::Pattern(), RagTime5StyleManager::GraphicStyle::read(), MacPaintParser::readBitmap(), SuperPaintParser::readBitmap(), BeagleWksBMParser::readBitmap(), MacWrtProStructures::readBlock(), ApplePictParser::readBWPattern(), MacDrawProStyleManager::readBWPatterns(), libmwaw_applepict1::OpCode::readColor(), ApplePictParser::readColorPattern(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), RagTimeParser::readColorTable(), RagTimeParser::readDataZoneHeader(), LightWayTxtText::readFont2(), MacDrawProStyleManager::readFontStyles(), HanMacWrdJGraph::readFrames(), MacDraftParser::readLabel(), MacDrawProParser::readObject(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), MacDraft5StyleManager::readPatterns(), BeagleWksDRParser::readStyle(), GreatWksGraph::readStyle(), HanMacWrdKGraph::readTable(), HanMacWrdJGraph::readTableFormatsList(), ApplePictParser::readZone(), MarinerWrtTextInternal::Paragraph::BorderFill::resetBackgroundColor(), MWAWFont::resetColor(), MacDrawProParser::send(), BeagleWksDRParser::sendPictures(), MarinerWrtGraph::sendRule(), ClarisDrawGraph::sendShape(), and RagTime5StyleManager::updateSurfaceStyle().
|
friend |
operator<< in the form #rrggbb
|
protected |
the argb color
Referenced by barycenter(), operator<(), operator<<(), operator<=(), and operator==().