a basic pattern used in a MWAWGraphicStyle: More...
#include <MWAWGraphicStyle.hxx>
Public Member Functions | |
| Pattern () | |
| constructor | |
| Pattern (MWAWVec2i dim, librevenge::RVNGBinaryData const &picture, std::string const &mime, MWAWColor const &avColor) | |
| constructor from a binary data | |
| virtual | ~Pattern () |
| virtual destructor | |
| bool | empty () const |
| return true if we does not have a pattern | |
| bool | getAverageColor (MWAWColor &col) const |
| return the average color | |
| bool | getUniqueColor (MWAWColor &col) const |
| check if the pattern has only one color; if so returns true... | |
| bool | getBinary (librevenge::RVNGBinaryData &data, std::string &type) const |
| tries to convert the picture in a binary data ( ppm) | |
| int | cmp (Pattern const &a) const |
| compare two patterns | |
Public Attributes | |
| MWAWVec2i | m_dim |
| the dimension width x height | |
| MWAWColor | m_colors [2] |
| the two indexed colors | |
| 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], ... | |
Protected Attributes | |
| librevenge::RVNGBinaryData | m_picture |
| a picture | |
| std::string | m_pictureMime |
| the picture type | |
| MWAWColor | m_pictureAverageColor |
| the picture average color | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, Pattern const &pat) |
| a print operator | |
a basic pattern used in a MWAWGraphicStyle:
| MWAWGraphicStyle::Pattern::Pattern | ( | ) | [inline] |
constructor
| MWAWGraphicStyle::Pattern::Pattern | ( | MWAWVec2i | dim, |
| librevenge::RVNGBinaryData const & | picture, | ||
| std::string const & | mime, | ||
| MWAWColor const & | avColor | ||
| ) | [inline] |
constructor from a binary data
| virtual MWAWGraphicStyle::Pattern::~Pattern | ( | ) | [inline, virtual] |
virtual destructor
| int MWAWGraphicStyle::Pattern::cmp | ( | Pattern const & | a | ) | const [inline] |
compare two patterns
Referenced by MWAWGraphicStyle::cmp().
| bool MWAWGraphicStyle::Pattern::empty | ( | ) | const [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 RagTimeParser::readDataZoneHeader(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDrawParser::readObject(), BeagleWksDRParser::readStyle(), GreatWksGraph::readStyle(), GreatWksSSParser::readStyles(), and ClarisWksStyleManager::updateWallPaper().
| bool MWAWGraphicStyle::Pattern::getBinary | ( | librevenge::RVNGBinaryData & | 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(), RagTimeParser::readDataZoneHeader(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDrawParser::readObject(), MacDrawProParser::readObject(), BeagleWksDRParser::readStyle(), and MacDraftParser::send().
| std::ostream& operator<< | ( | std::ostream & | o, |
| Pattern const & | pat | ||
| ) | [friend] |
a print operator
the two indexed colors
Referenced by cmp(), getUniqueColor(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::Pattern::Pattern(), Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), HanMacWrdJGraphInternal::Pattern::Pattern(), MacDrawProStyleManager::readBWPatterns(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), RagTimeParser::readDataZoneHeader(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), MsWksGraph::readPictHeader(), SuperPaintParser::readShape(), BeagleWksDRParser::readStyle(), GreatWksGraph::readStyle(), GreatWksSSParser::readStyles(), and MarinerWrtGraph::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(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::Pattern::Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), HanMacWrdJGraphInternal::Pattern::Pattern(), MacDrawProStyleManager::readBWPatterns(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), GreatWksGraph::readPatterns(), BeagleWksDRParser::readPatterns(), SuperPaintParser::readShape(), GreatWksGraph::readStyle(), and GreatWksSSParser::readStyles().
the dimension width x height
Referenced by MWAWGraphicStyle::addTo(), cmp(), empty(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::Pattern::Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), HanMacWrdJGraphInternal::Pattern::Pattern(), MacDrawProStyleManager::readBWPatterns(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), GreatWksGraph::readPatterns(), BeagleWksDRParser::readPatterns(), SuperPaintParser::readShape(), GreatWksGraph::readStyle(), and GreatWksSSParser::readStyles().
librevenge::RVNGBinaryData MWAWGraphicStyle::Pattern::m_picture [protected] |
a picture
Referenced by cmp(), empty(), and getUniqueColor().
the picture average color
Referenced by cmp().
std::string MWAWGraphicStyle::Pattern::m_pictureMime [protected] |
the picture type
Referenced by cmp().