Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
WPSGraphicStyle::Pattern Struct Reference

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

`#include <WPSGraphicStyle.h>`

## Public Member Functions
| Pattern ()
| constructor More...
| Pattern (Vec2i dim, librevenge::RVNGBinaryData const &picture, std::string const &mime, WPSColor const &avColor)
| constructor from a binary data More...
| Pattern (Pattern const &)=default
virtual | ~Pattern ()
| virtual destructor More...
bool | empty () const
| return true if we does not have a pattern More...
bool | getAverageColor (WPSColor &col) const
| return the average color More...
bool | getUniqueColor (WPSColor &col) const
| check if the pattern has only one color; if so returns true... More...
bool | getBinary (librevenge::RVNGBinaryData &data, std::string &type) const
| tries to convert the picture in a binary data ( ppm) More...
int | cmp (Pattern const &a) const
| compare two patterns More...
Pattern & | operator= (Pattern const &)=default
| operator= More...

## Public Attributes
Vec2i | m_dim
| the dimension width x height More...
WPSColor | 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
librevenge::RVNGBinaryData | m_picture
| a picture More...
std::string | m_pictureMime
| the picture type More...
WPSColor | 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 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/3]

WPSGraphicStyle::Pattern::Pattern | ( |  | ) |
| inline

constructor

## ◆ Pattern() [2/3]

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

constructor from a binary data

## ◆ Pattern() [3/3]

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

## ◆ ~Pattern()

WPSGraphicStyle::Pattern::~Pattern | ( |  | ) |
| virtual

virtual destructor

## Member Function Documentation

## ◆ cmp()

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

compare two patterns

Referenced by WPSGraphicStyle::cmp().

## ◆ empty()

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

return true if we does not have a pattern

Referenced by WPSGraphicStyle::hasPattern().

## ◆ getAverageColor()

bool WPSGraphicStyle::Pattern::getAverageColor | ( | WPSColor & | col | ) | const

return the average color

Referenced by Quattro9Spreadsheet::readCellStyles(), LotusStyleManager::readLineStyle(), LotusChart::readSerie(), QuattroGraph::readShapeHeader(), WKSChart::Serie::setPrimaryPattern(), LotusStyleManager::updateCellStyle(), and LotusStyleManager::updateShadowStyle().

## ◆ getBinary()

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

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

Referenced by WPSGraphicStyle::addTo().

## ◆ getUniqueColor()

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

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

Referenced by WPSGraphicStyle::addTo(), LotusChart::readFramesStyle(), LotusChart::readSerie(), Quattro9Graph::readShapeRec(), WKSChart::Serie::setPrimaryPattern(), WKS4Chart::updateChart(), and LotusStyleManager::updateSurfaceStyle().

## ◆ operator=()

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

operator=

## Friends And Related Function Documentation

## ◆ operator<<

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

a print operator

## Member Data Documentation

## ◆ m_colors

WPSColor WPSGraphicStyle::Pattern::m_colors[2]

the two indexed colors

Referenced by cmp(), Pattern(), Quattro9Spreadsheet::readCellStyles(), QuattroDosChart::readChart(), LotusChart::readFramesStyle(), LotusStyleManager::readLineStyle(), LotusChart::readSerie(), QuattroGraph::readShapeHeader(), Quattro9Graph::readShapeRec(), LotusStyleManager::updateCellStyle(), WKS4Chart::updateChart(), LotusStyleManager::updateShadowStyle(), and LotusStyleManager::updateSurfaceStyle().

## ◆ m_data

std::vector<unsigned char> WPSGraphicStyle::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(), QuattroDosChartInternal::State::getPattern(), WKS4ChartInternal::State::getPattern(), QuattroGraphInternal::State::getPattern(), Quattro9GraphInternal::State::getPattern24(), Quattro9GraphInternal::State::getPattern32(), LotusStyleManagerInternal::State::getPattern48(), and LotusStyleManagerInternal::State::getPattern64().

## ◆ m_dim

Vec2i WPSGraphicStyle::Pattern::m_dim

the dimension width x height

Referenced by WPSGraphicStyle::addTo(), cmp(), empty(), QuattroDosChartInternal::State::getPattern(), WKS4ChartInternal::State::getPattern(), QuattroGraphInternal::State::getPattern(), Quattro9GraphInternal::State::getPattern24(), Quattro9GraphInternal::State::getPattern32(), LotusStyleManagerInternal::State::getPattern48(), and LotusStyleManagerInternal::State::getPattern64().

## ◆ m_picture

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

a picture

Referenced by cmp(), and empty().

## ◆ m_pictureAverageColor

WPSColor WPSGraphicStyle::Pattern::m_pictureAverageColor
| protected

the picture average color

Referenced by cmp().

## ◆ m_pictureMime

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

the picture type

Referenced by cmp().

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

- WPSGraphicStyle.h
- WPSGraphicStyle.cpp