MWAWGraphicStyle::Pattern Struct Reference

a basic pattern used in a MWAWGraphicStyle: More...

`#include <MWAWGraphicStyle.hxx>`

Inheritance diagram for MWAWGraphicStyle::Pattern:

## Public Member Functions
| Pattern ()
| constructor
| Pattern (MWAWVec2i dim, MWAWEmbeddedObject const &picture, MWAWColor const &avColor)
| constructor from a binary data
| Pattern (Pattern const &)=default
Pattern & | operator= (Pattern const &)=default
Pattern & | operator= (Pattern &&)=default
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 (MWAWEmbeddedObject &picture) 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
MWAWEmbeddedObject | m_picture
| a picture
MWAWColor | m_pictureAverageColor
| the picture average color

## Friends
std::ostream & | operator<< (std::ostream &o, Pattern const &pat)
| a print operator

## Detailed Description

a basic pattern used in a MWAWGraphicStyle:

- either given a list of 8x8, 16x16, 32x32 bytes with two colors
- or with a picture ( and an average color)

## Constructor & Destructor Documentation

## ◆ Pattern() [1/3]

MWAWGraphicStyle::Pattern::Pattern | ( |  | ) |
| inline

constructor

Referenced by cmp(), RagTimeParserInternal::State::initDefaultPatterns(), HanMacWrdJGraphInternal::State::initPatterns(), HanMacWrdKGraphInternal::State::initPatterns(), operator<<, operator=(), operator=(), Pattern(), and ClarisWksStyleManagerInternal::State::setDefaultPatternList().

## ◆ Pattern() [2/3]

MWAWGraphicStyle::Pattern::Pattern | ( | MWAWVec2i | dim,
|  | MWAWEmbeddedObject const & | picture,
|  | MWAWColor const & | avColor )
| inline

constructor from a binary data

## ◆ Pattern() [3/3]

MWAWGraphicStyle::Pattern::Pattern | ( | Pattern const & |  | ) |
| default

## ◆ ~Pattern()

MWAWGraphicStyle::Pattern::~Pattern | ( |  | ) |
| virtual

virtual destructor

Reimplemented in ClarisWksStyleManagerInternal::Pattern, HanMacWrdJGraphInternal::Pattern, HanMacWrdKGraphInternal::Pattern, and RagTimeParserInternal::Pattern.

## Member Function Documentation

## ◆ cmp()

int MWAWGraphicStyle::Pattern::cmp | ( | Pattern const & | a | ) | const
| inline

compare two patterns

## ◆ empty()

bool MWAWGraphicStyle::Pattern::empty | ( |  | ) | const
| inline

return true if we does not have a pattern

Referenced by getAverageColor(), getBinary(), getUniqueColor(), FreeHandParserInternal::State::updateFillStyle(), and FreeHandParserInternal::State::updateLineStyle().

## ◆ getAverageColor()

bool MWAWGraphicStyle::Pattern::getAverageColor | ( | MWAWColor & | col | ) | const

return the average color

Referenced by WingzGraph::readColor(), RagTimeParser::readDataZoneHeader(), HanMacWrdJGraph::readFrames(), HanMacWrdKGraph::readFrames(), PowerPoint3Parser::readFramesList(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDrawParser::readObject(), MacDrawProParser::readObject(), ReadySetGoGraph::readShapeDSV2(), ReadySetGoGraph::readShapeV3(), ReadySetGoGraph::readShapeV6(), GreatWksGraph::readStyle(), GreatWksSSParser::readStyles(), CanvasGraph::sendMultiLines(), DrawTableParser::sendShape(), CanvasGraph::update(), MacDraft5StyleManager::updateLineStyle(), and ClarisWksStyleManager::updateWallPaper().

## ◆ getBinary()

bool MWAWGraphicStyle::Pattern::getBinary | ( | MWAWEmbeddedObject & | picture | ) | const

tries to convert the picture in a binary data ( ppm)

## ◆ getUniqueColor()

bool MWAWGraphicStyle::Pattern::getUniqueColor | ( | MWAWColor & | col | ) | const

check if the pattern has only one color; if so returns true...

Referenced by HanMacWrdJGraph::readFrames(), HanMacWrdKGraph::readFrames(), PowerPoint3Parser::readFramesList(), WingzGraph::readGraphic(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDrawParser::readObject(), MacDrawProParser::readObject(), ReadySetGoGraph::readShapeDSV2(), ReadySetGoGraph::readShapeV3(), ReadySetGoGraph::readShapeV6(), PowerPoint7Graph::readStyle(), and MacDraftParser::send().

## ◆ operator=() [1/2]

Pattern & MWAWGraphicStyle::Pattern::operator= | ( | Pattern && |  | ) |
| default

## ◆ operator=() [2/2]

Pattern & MWAWGraphicStyle::Pattern::operator= | ( | Pattern const & |  | ) |
| default

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | o,
|  | Pattern const & | pat )
| friend

a print operator

## Member Data Documentation

## ◆ m_colors

MWAWColor MWAWGraphicStyle::Pattern::m_colors[2]

the two indexed colors

Referenced by cmp(), getAverageColor(), getBinary(), getUniqueColor(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawProStyleManagerInternal::State::initBWPatterns(), DrawTableParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDrawParserInternal::State::initPatterns(), WingzGraphInternal::State::initPatterns(), operator<<, ClarisWksStyleManagerInternal::Pattern::Pattern(), HanMacWrdJGraphInternal::Pattern::Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), Pattern(), Pattern(), RagTimeParserInternal::Pattern::Pattern(), ApplePictParser::readBWPattern(), MacDrawProStyleManager::readBWPatterns(), ApplePictParser::readColorPattern(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), FreeHandParser::readFillStyle(), HanMacWrdJGraph::readFrames(), HanMacWrdKGraph::readFrames(), PowerPoint1Parser::readFramesList(), PowerPoint3Parser::readFramesList(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), FreeHandParser::readLineStyle(), MacDrawProParser::readObject(), MacDraftParser::readPattern(), WingzGraph::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), MacDraft5StyleManager::readPatterns(), MsWksGraph::readPictHeader(), SuperPaintParser::readShape(), ReadySetGoGraph::readShapeDSV2(), ReadySetGoGraph::readShapeV3(), ReadySetGoGraph::readShapeV6(), GreatWksGraph::readStyle(), PowerPoint7Graph::readStyle(), GreatWksSSParser::readStyles(), CanvasGraph::sendMultiLines(), MarinerWrtGraph::sendRule(), DrawTableParser::sendShape(), CanvasGraph::update(), FreeHandParserInternal::State::updateFillStyle(), and FreeHandParserInternal::State::updateLineStyle().

## ◆ m_data

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(), MsWksGraphInternal::Pattern::get(), getAverageColor(), getBinary(), PowerPoint1ParserInternal::State::getPattern(), PowerPoint3ParserInternal::State::getPattern(), PowerPoint7GraphInternal::State::getPattern(), getUniqueColor(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawProStyleManagerInternal::State::initBWPatterns(), DrawTableParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDrawParserInternal::State::initPatterns(), WingzGraphInternal::State::initPatterns(), operator<<, ClarisWksStyleManagerInternal::Pattern::Pattern(), HanMacWrdJGraphInternal::Pattern::Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), Pattern(), Pattern(), RagTimeParserInternal::Pattern::Pattern(), ApplePictParser::readBWPattern(), MacDrawProStyleManager::readBWPatterns(), ApplePictParser::readColorPattern(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), FreeHandParser::readFillStyle(), FreeHandParser::readLineStyle(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), BeagleWksDRParser::readPatterns(), GreatWksGraph::readPatterns(), MacDraft5StyleManager::readPatterns(), GreatWksGraph::readStyle(), and GreatWksSSParser::readStyles().

## ◆ m_dim

MWAWVec2i MWAWGraphicStyle::Pattern::m_dim

the dimension width x height

Referenced by cmp(), empty(), MsWksGraphInternal::Pattern::get(), getBinary(), PowerPoint1ParserInternal::State::getPattern(), PowerPoint3ParserInternal::State::getPattern(), PowerPoint7GraphInternal::State::getPattern(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawProStyleManagerInternal::State::initBWPatterns(), DrawTableParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDrawParserInternal::State::initPatterns(), WingzGraphInternal::State::initPatterns(), operator<<, ClarisWksStyleManagerInternal::Pattern::Pattern(), HanMacWrdJGraphInternal::Pattern::Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), Pattern(), Pattern(), RagTimeParserInternal::Pattern::Pattern(), ApplePictParser::readBWPattern(), MacDrawProStyleManager::readBWPatterns(), ApplePictParser::readColorPattern(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), FreeHandParser::readFillStyle(), FreeHandParser::readLineStyle(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), BeagleWksDRParser::readPatterns(), GreatWksGraph::readPatterns(), MacDraft5StyleManager::readPatterns(), GreatWksGraph::readStyle(), and GreatWksSSParser::readStyles().

## ◆ m_picture

MWAWEmbeddedObject MWAWGraphicStyle::Pattern::m_picture
| protected

a picture

Referenced by cmp(), empty(), getAverageColor(), getBinary(), getUniqueColor(), operator<<, Pattern(), and Pattern().

## ◆ m_pictureAverageColor

MWAWColor MWAWGraphicStyle::Pattern::m_pictureAverageColor
| protected

the picture average color

Referenced by cmp(), getAverageColor(), operator<<, Pattern(), and Pattern().

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

- MWAWGraphicStyle.hxx
- MWAWGraphicStyle.cxx