WPSGraphicStyle::Pattern Struct Reference

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

#include <WPSGraphicStyle.h>

Public Member Functions

 Pattern ()
 constructor
 Pattern (Vec2i dim, librevenge::RVNGBinaryData const &picture, std::string const &mime, WPSColor const &avColor)
 constructor from a binary data
 Pattern (Pattern const &)=default
 Pattern (Pattern &&)=default
virtual ~Pattern ()
 virtual destructor
bool empty () const
 return true if we does not have a pattern
bool getAverageColor (WPSColor &col) const
 return the average color
bool getUniqueColor (WPSColor &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
Patternoperator= (Pattern const &)=default
 operator=

Public Attributes

Vec2i m_dim
 the dimension width x height
WPSColor 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
WPSColor 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 WPSGraphicStyle:

  • 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/4]

WPSGraphicStyle::Pattern::Pattern ( )
inline

constructor

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

◆ Pattern() [2/4]

WPSGraphicStyle::Pattern::Pattern ( Vec2i dim,
librevenge::RVNGBinaryData const & picture,
std::string const & mime,
WPSColor const & avColor )
inline

constructor from a binary data

◆ Pattern() [3/4]

WPSGraphicStyle::Pattern::Pattern ( Pattern const & )
default

◆ Pattern() [4/4]

WPSGraphicStyle::Pattern::Pattern ( Pattern && )
default

◆ ~Pattern()

WPSGraphicStyle::Pattern::~Pattern ( )
virtual

virtual destructor

Member Function Documentation

◆ cmp()

int WPSGraphicStyle::Pattern::cmp ( Pattern const & a) const
inline

compare two patterns

◆ empty()

bool WPSGraphicStyle::Pattern::empty ( ) const
inline

return true if we does not have a pattern

Referenced by getAverageColor(), getBinary(), getUniqueColor(), and LotusStyleManagerInternal::ColorStyle::operator<<.

◆ getAverageColor()

◆ getBinary()

bool WPSGraphicStyle::Pattern::getBinary ( librevenge::RVNGBinaryData & data,
std::string & type ) const

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

◆ getUniqueColor()

bool WPSGraphicStyle::Pattern::getUniqueColor ( WPSColor & col) const

◆ operator=()

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

operator=

◆ operator<<

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

a print operator

Member Data Documentation

◆ m_colors

◆ m_data

◆ m_dim

◆ m_picture

librevenge::RVNGBinaryData WPSGraphicStyle::Pattern::m_picture
protected

◆ m_pictureAverageColor

WPSColor WPSGraphicStyle::Pattern::m_pictureAverageColor
protected

the picture average color

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

◆ m_pictureMime

std::string WPSGraphicStyle::Pattern::m_pictureMime
protected

the picture type

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


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

Generated on Sat Jul 19 2025 05:24:40 for libwps by doxygen 1.14.0