MWAWGraphicStyle::Pattern Struct Reference

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

#include <MWAWGraphicStyle.hxx>

Inheritance diagram for MWAWGraphicStyle::Pattern:
ClarisWksStyleManagerInternal::Pattern HanMacWrdJGraphInternal::Pattern HanMacWrdKGraphInternal::Pattern RagTimeParserInternal::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
 
Patternoperator= (Pattern const &)=default
 
Patternoperator= (Pattern &&)=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]

◆ 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

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

◆ getAverageColor()

◆ getBinary()

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

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

Referenced by MWAWGraphicStyle::addTo().

◆ getUniqueColor()

◆ operator=() [1/2]

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

◆ operator=() [2/2]

Pattern& MWAWGraphicStyle::Pattern::operator= ( Pattern &&  )
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(), DrawTableParserInternal::State::initPatterns(), 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(), ReadySetGoParser::readShapeV3(), PowerPoint7Graph::readStyle(), GreatWksGraph::readStyle(), GreatWksSSParser::readStyles(), CanvasGraph::sendMultiLines(), MarinerWrtGraph::sendRule(), DrawTableParser::sendShape(), ClarisWksStyleManagerInternal::Gradient::update(), CanvasGraph::update(), FreeHandParserInternal::State::updateFillStyle(), and FreeHandParserInternal::State::updateLineStyle().

◆ m_data

◆ m_dim

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

Generated for libmwaw by doxygen 1.8.14