MWAWGraphicStyle::Pattern Struct Reference documentation

Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
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 More...
| Pattern (MWAWVec2i dim, MWAWEmbeddedObject const &picture, MWAWColor const &avColor)
| constructor from a binary data More...
| Pattern (Pattern const &)=default
Pattern & | operator= (Pattern const &)=default
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 (MWAWEmbeddedObject &picture) const
| tries to convert the picture in a binary data ( ppm) More...
int | cmp (Pattern const &a) const
| compare two patterns More...

## Public Attributes
MWAWVec2i | 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
MWAWEmbeddedObject | m_picture
| a picture More...
MWAWColor | m_pictureAverageColor
| the picture average color More...

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

## 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 RagTimeParserInternal::State::initDefaultPatterns(), HanMacWrdKGraphInternal::State::initPatterns(), 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 HanMacWrdJGraphInternal::Pattern, HanMacWrdKGraphInternal::Pattern, RagTimeParserInternal::Pattern, and ClarisWksStyleManagerInternal::Pattern.

## Member Function Documentation

## ◆ cmp()

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

compare two patterns

Referenced by MWAWGraphicStyle::cmp().

## ◆ empty()

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

return true if we does not have a pattern

Referenced by MWAWGraphicStyle::hasPattern(), FreeHandParserInternal::State::updateFillStyle(), FreeHandParserInternal::State::updateLineStyle(), and ApplePictParserInternal::State::updateStyle().

## ◆ getAverageColor()

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

return the average color

Referenced by WingzGraph::readColor(), RagTimeParser::readDataZoneHeader(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), PowerPoint3Parser::readFramesList(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDrawParser::readObject(), GreatWksGraph::readStyle(), GreatWksSSParser::readStyles(), MacDraft5StyleManager::updateLineStyle(), ApplePictParserInternal::State::updateStyle(), and ClarisWksStyleManager::updateWallPaper().

## ◆ getBinary()

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

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

Referenced by MWAWGraphicStyle::addTo().

## ◆ getUniqueColor()

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

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

Referenced by MWAWGraphicStyle::addTo(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), PowerPoint3Parser::readFramesList(), WingzGraph::readGraphic(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDrawParser::readObject(), MacDrawProParser::readObject(), PowerPoint7Graph::readStyle(), MacDraftParser::send(), and ApplePictParserInternal::State::updateStyle().

## ◆ operator=()

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

## Friends And Related Function 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(), ClarisWksStyleManagerInternal::Gradient::Gradient(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), WingzGraphInternal::State::initPatterns(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::Pattern::Pattern(), Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), ApplePictParser::readBWPattern(), MacDrawProStyleManager::readBWPatterns(), ApplePictParser::readColorPattern(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), FreeHandParser::readFillStyle(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), PowerPoint1Parser::readFramesList(), PowerPoint3Parser::readFramesList(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), FreeHandParser::readLineStyle(), MacDraftParser::readPattern(), WingzGraph::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), MacDraft5StyleManager::readPatterns(), MsWksGraph::readPictHeader(), PowerPoint7Graph::readStyle(), GreatWksGraph::readStyle(), GreatWksSSParser::readStyles(), MarinerWrtGraph::sendRule(), ClarisWksStyleManagerInternal::Gradient::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(), PowerPoint1ParserInternal::State::getPattern(), PowerPoint7GraphInternal::State::getPattern(), PowerPoint3ParserInternal::State::getPattern(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), WingzGraphInternal::State::initPatterns(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::Pattern::Pattern(), HanMacWrdKGraphInternal::Pattern::Pattern(), ApplePictParser::readBWPattern(), MacDrawProStyleManager::readBWPatterns(), ApplePictParser::readColorPattern(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), FreeHandParser::readFillStyle(), FreeHandParser::readLineStyle(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), MacDraft5StyleManager::readPatterns(), GreatWksGraph::readPatterns(), BeagleWksDRParser::readPatterns(), GreatWksGraph::readStyle(), and GreatWksSSParser::readStyles().

## ◆ m_dim

MWAWVec2i MWAWGraphicStyle::Pattern::m_dim

the dimension width x height

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

## ◆ m_picture

MWAWEmbeddedObject MWAWGraphicStyle::Pattern::m_picture
| protected

a picture

Referenced by cmp(), and empty().

## ◆ m_pictureAverageColor

MWAWColor MWAWGraphicStyle::Pattern::m_pictureAverageColor
| protected

the picture average color

Referenced by cmp().

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

- MWAWGraphicStyle.hxx
- MWAWGraphicStyle.cxx