a basic pattern used in a MWAWGraphicStyle: More...
#include <MWAWGraphicStyle.hxx>
Public Member Functions | |
Pattern () | |
constructor More... | |
Pattern (Vec2i dim, WPXBinaryData const &picture, std::string const &mime, MWAWColor const &avColor) | |
constructor from a binary data More... | |
virtual | ~Pattern () |
virtual destructor More... | |
bool | empty () const |
return true if we does not have a pattern More... | |
bool | getAverageColor (MWAWColor &col) const |
return the average color More... | |
bool | getUniqueColor (MWAWColor &col) const |
check if the pattern has only one color; if so returns true... More... | |
bool | getBinary (WPXBinaryData &data, std::string &type) const |
tries to convert the picture in a binary data ( ppm) More... | |
int | cmp (Pattern const &a) const |
compare two patterns More... | |
Public Attributes | |
Vec2i | m_dim |
the dimension width x height More... | |
MWAWColor | m_colors [2] |
the two indexed colors More... | |
std::vector< unsigned char > | m_data |
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1], ... More... | |
Protected Attributes | |
WPXBinaryData | m_picture |
a picture More... | |
std::string | m_pictureMime |
the picture type More... | |
MWAWColor | m_pictureAverageColor |
the picture average color More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, Pattern const &pat) |
a print operator More... | |
a basic pattern used in a MWAWGraphicStyle:
|
inline |
constructor
|
inline |
constructor from a binary data
|
inlinevirtual |
virtual destructor
|
inline |
compare two patterns
Referenced by MWAWGraphicStyle::cmp().
|
inline |
return true if we does not have a pattern
Referenced by getUniqueColor(), and MWAWGraphicStyle::hasPattern().
bool MWAWGraphicStyle::Pattern::getAverageColor | ( | MWAWColor & | col | ) | const |
return the average color
Referenced by HMWKGraph::readFrames(), HMWJGraph::readFrames(), CWStyleManager::readGraphStyles(), CWGraph::readGroupDef(), GWGraph::readStyle(), and CWStyleManager::updateWallPaper().
bool MWAWGraphicStyle::Pattern::getBinary | ( | WPXBinaryData & | data, |
std::string & | type | ||
) | const |
tries to convert the picture in a binary data ( ppm)
Referenced by MWAWGraphicStyle::addTo().
bool MWAWGraphicStyle::Pattern::getUniqueColor | ( | MWAWColor & | col | ) | const |
check if the pattern has only one color; if so returns true...
Referenced by MWAWGraphicStyle::addTo(), HMWKGraph::readFrames(), HMWJGraph::readFrames(), CWStyleManager::readGraphStyles(), and CWGraph::readGroupDef().
|
friend |
a print operator
MWAWColor MWAWGraphicStyle::Pattern::m_colors[2] |
the two indexed colors
Referenced by cmp(), getUniqueColor(), CWStyleManagerInternal::Pattern::Pattern(), MRWGraphInternal::Pattern::Pattern(), Pattern(), HMWKGraphInternal::Pattern::Pattern(), HMWJGraphInternal::Pattern::Pattern(), HMWKGraph::readFrames(), HMWJGraph::readFrames(), CWStyleManager::readGraphStyles(), CWGraph::readGroupDef(), MSKGraph::readPictHeader(), GWGraph::readStyle(), and MRWGraph::sendRule().
std::vector<unsigned char> MWAWGraphicStyle::Pattern::m_data |
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1], ...
Referenced by cmp(), empty(), getUniqueColor(), CWStyleManagerInternal::Pattern::Pattern(), MRWGraphInternal::Pattern::Pattern(), HMWKGraphInternal::Pattern::Pattern(), HMWJGraphInternal::Pattern::Pattern(), GWGraph::readPatterns(), and GWGraph::readStyle().
Vec2i MWAWGraphicStyle::Pattern::m_dim |
the dimension width x height
Referenced by MWAWGraphicStyle::addTo(), cmp(), empty(), CWStyleManagerInternal::Pattern::Pattern(), MRWGraphInternal::Pattern::Pattern(), HMWKGraphInternal::Pattern::Pattern(), HMWJGraphInternal::Pattern::Pattern(), GWGraph::readPatterns(), and GWGraph::readStyle().
|
protected |
a picture
Referenced by cmp(), empty(), and getUniqueColor().
|
protected |
the picture average color
Referenced by cmp().
|
protected |
the picture type
Referenced by cmp().