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...
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/2]

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

constructor

Referenced by RagTimeParserInternal::State::initDefaultPatterns(), and ClarisWksStyleManagerInternal::State::setDefaultPatternList().

## ◆ Pattern() [2/2]

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

constructor from a binary data

## ◆ ~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(), and FreeHandParserInternal::State::updateLineStyle().

## ◆ getAverageColor()

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

return the average color

Referenced by RagTimeParser::readDataZoneHeader(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), PowerPoint3Parser::readFramesList(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDrawParser::readObject(), BeagleWksDRParser::readStyle(), GreatWksGraph::readStyle(), GreatWksSSParser::readStyles(), MacDraft5StyleManager::updateLineStyle(), FreeHandParserInternal::State::updateLineStyle(), 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(), RagTimeParser::readDataZoneHeader(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), PowerPoint3Parser::readFramesList(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), MacDrawParser::readObject(), MacDrawProParser::readObject(), BeagleWksDRParser::readStyle(), PowerPoint7Graph::readStyle(), and MacDraftParser::send().

## Friends And Related Function Documentation

## ◆ operator<<

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

a print operator

Referenced by RagTimeParserInternal::Zone::getTypeString().

## 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(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::Pattern::Pattern(), ApplePictParser::readBWPattern(), MacDrawProStyleManager::readBWPatterns(), ApplePictParser::readColorPattern(), MacDrawProStyleManager::readColorPatterns(), RagTime5Graph::readColorPatternZone(), RagTimeParser::readDataZoneHeader(), FreeHandParser::readFillStyle(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), PowerPoint1Parser::readFramesList(), PowerPoint3Parser::readFramesList(), ClarisWksStyleManager::readGraphStyles(), ClarisDrawGraph::readGroupDef(), ClarisWksGraph::readGroupDef(), FreeHandParser::readLineStyle(), MacDraftParser::readPattern(), ClarisDrawStyleManager::readPatternList(), MacDrawProStyleManager::readPatternMap(), MacDraft5StyleManager::readPatterns(), MsWksGraph::readPictHeader(), BeagleWksDRParser::readStyle(), PowerPoint7Graph::readStyle(), GreatWksGraph::readStyle(), GreatWksSSParser::readStyles(), MarinerWrtGraph::sendRule(), ClarisWksStyleManagerInternal::Gradient::update(), FreeHandParserInternal::State::updateFillStyle(), FreeHandParserInternal::State::updateLineStyle(), and RagTime5StyleManager::updateSurfaceStyle().

## ◆ 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(), PowerPoint1ParserInternal::State::getPattern(), PowerPoint7GraphInternal::State::getPattern(), PowerPoint3ParserInternal::State::getPattern(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::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_dim

MWAWVec2i MWAWGraphicStyle::Pattern::m_dim

the dimension width x height

Referenced by MWAWGraphicStyle::addTo(), cmp(), PowerPoint1ParserInternal::State::getPattern(), PowerPoint7GraphInternal::State::getPattern(), PowerPoint3ParserInternal::State::getPattern(), MacDrawProStyleManagerInternal::State::initBWPatterns(), ClarisDrawStyleManagerInternal::State::initBWPatterns(), MacDrawParserInternal::State::initPatterns(), MacDraftParserInternal::State::initPatterns(), MacDraft5StyleManagerInternal::State::initPatterns(), ClarisWksStyleManagerInternal::Pattern::Pattern(), RagTimeParserInternal::Pattern::Pattern(), MarinerWrtGraphInternal::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().

## ◆ 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