MWAWColor Struct Reference

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...

## Detailed Description

the class to store a color

## Constructor & Destructor Documentation

MWAWColor::MWAWColor | ( | uint32_t | argb = `0` | ) |

inline

constructor

Referenced by black(), and white().

MWAWColor::MWAWColor | ( | unsigned char | r,
|  | unsigned char | g,
|  | unsigned char | b,
|  | unsigned char | a = `0`
| ) |  |

inline

constructor from color

## Member Function Documentation

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

static

return alpha*colA+beta*colB

Referenced by MRWTextInternal::Paragraph::BorderFill::getBackgroundColor(), MSKGraphInternal::BasicForm::getBinaryData(), GWGraphInternal::Style::getColor(), GWGraphInternal::Style::Color::getColor(), MWProStructures::getColor(), HMWKGraphInternal::State::getColor(), HMWJGraphInternal::State::getColor(), CWGraph::getLineColor(), CWStyleManager::Graphic::getLineColor(), CWGraph::getSurfaceColor(), CWStyleManager::Graphic::getSurfaceColor(), LWText::readFont2(), and MRWGraph::sendRule().

static MWAWColor MWAWColor::black | ( |  | ) |

inline static

return the back color

Referenced by GWGraphInternal::Style::Color::Color(), HMWKGraphInternal::Frame::Frame(), HMWJGraphInternal::FrameFormat::FrameFormat(), MSKGraphInternal::BasicForm::getBinaryData(), CWStyleManager::Graphic::Graphic(), CWText::readChar(), libmwaw_applepict1::OpCode::readColor(), MSWTextStyles::readFont(), CWText::readFont(), LWText::readFont2(), HMWJGraph::readFrames(), HMWKGraph::readTable(), HMWJGraph::readTableFormatsList(), MRWTextInternal::Paragraph::BorderFill::resetBackgroundColor(), and HMWKGraph::sendTextBox().

bool MWAWColor::isBlack | ( |  | ) | const

inline

return true if the color is black

Referenced by MRWTextInternal::Paragraph::BorderFill::hasBackgroundColor(), GWGraphInternal::Style::Color::isDefault(), operator<<(), HMWKGraphInternal::operator<<(), FWStruct::operator<<(), MRWTextInternal::operator<<(), MORStruct::operator<<(), MSKGraphInternal::Zone::print(), MRWParser::readDocInfo(), MORParser::readDocumentInfo(), and GWParser::readGrDS().

bool MWAWColor::isWhite | ( |  | ) | const

inline

return true if the color is white

Referenced by MWAWSection::addTo(), MWAWParagraph::addTo(), MWProStructuresInternal::Block::fillFramePropertyList(), MSKGraphInternal::TextBox::fillFramePropertyList(), MSKGraphInternal::TextBoxv4::fillFramePropertyList(), MWAWPageSpan::getPageProperty(), MRWTextInternal::Paragraph::BorderFill::hasBackgroundColor(), MWProStructuresInternal::Block::hasBorders(), GWGraphInternal::Style::Color::isDefault(), operator<<(), MRWParserInternal::operator<<(), HMWKGraphInternal::operator<<(), FWStruct::operator<<(), MRWTextInternal::operator<<(), MORStruct::operator<<(), MSKGraphInternal::Zone::print(), MORParser::readDocumentInfo(), GWParser::readGrDS(), MRWParser::readZone13(), HMWJGraph::sendComment(), FWGraph::sendSideBar(), MSKGraph::sendTable(), MSWText::sendTable(), HMWJGraph::sendTextbox(), and FWTextInternal::Paragraph::updateToSent().

bool MWAWColor::operator!= | ( | MWAWColor const & | c | ) | const

inline

operator!=

bool MWAWColor::operator< | ( | MWAWColor const & | c | ) | const

inline

operator<

Referenced by operator>=().

bool MWAWColor::operator<= | ( | MWAWColor const & | c | ) | const

inline

operator<=

Referenced by operator>().

MWAWColor& MWAWColor::operator= | ( | uint32_t | argb | ) |

inline

operator=

bool MWAWColor::operator== | ( | MWAWColor const & | c | ) | const

inline

operator==

Referenced by operator!=().

bool MWAWColor::operator> | ( | MWAWColor const & | c | ) | const

inline

operator>

bool MWAWColor::operator>= | ( | MWAWColor const & | c | ) | const

inline

operator>=

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

print the color in the form #rrggbb

Referenced by MWAWSection::addTo(), MWAWParagraph::addTo(), MWProStructuresInternal::Block::fillFramePropertyList(), MSKGraphInternal::TextBox::fillFramePropertyList(), MSKGraphInternal::TextBoxv4::fillFramePropertyList(), MWAWPageSpan::getPageProperty(), MWAWPictBasic::getStyle1DProperty(), MWAWPictBasic::getStyle2DProperty(), MORParser::readBackside(), HMWKText::readFont(), HMWKGraph::readTable(), HMWJGraph::sendComment(), FWGraph::sendSideBar(), HMWJGraph::sendTextbox(), HMWKGraph::sendTextBox(), and CWGraph::sendZone().

uint32_t MWAWColor::value | ( |  | ) | const

inline

return the rgba value

Referenced by getPPMData().

static MWAWColor MWAWColor::white | ( |  | ) |

inline static

return the white color

Referenced by GWGraphInternal::Style::Color::Color(), HMWKGraphInternal::Frame::Frame(), HMWJGraphInternal::FrameFormat::FrameFormat(), MSKGraphInternal::BasicForm::getBinaryData(), GWGraphInternal::Style::getColor(), GWGraphInternal::Style::Color::getColor(), MWProStructures::getColor(), HMWKGraphInternal::State::getColor(), HMWJGraphInternal::State::getColor(), BWTextInternal::Font::getFont(), CWGraph::getLineColor(), CWStyleManager::Graphic::getLineColor(), CWGraph::getSurfaceColor(), CWStyleManager::Graphic::getSurfaceColor(), CWStyleManager::Graphic::Graphic(), MWProStructures::readBlock(), libmwaw_applepict1::OpCode::readColor(), LWText::readFont2(), HMWJGraph::readFrames(), HMWKGraph::readTable(), HMWJGraph::readTableFormatsList(), MRWTextInternal::Paragraph::BorderFill::resetBackgroundColor(), MRWGraph::sendRule(), and HMWKGraph::sendTextBox().

## Friends And Related Function Documentation

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

friend

operator<< in the form #rrggbb

## Member Data Documentation

uint32_t MWAWColor::m_value

protected

the argb color

Referenced by barycenter(), isBlack(), isWhite(), operator<(), operator<<(), operator<=(), operator=(), operator==(), and value().

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

- libmwaw_internal.hxx
- libmwaw_internal.cxx