Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
WPSGraphicStyle Class Reference

a structure used to define a picture style More...

`#include <WPSGraphicStyle.h>`

## Classes
struct | GradientStop
| a structure used to define the gradient limit More...
struct | Pattern
| a basic pattern used in a WPSGraphicStyle: More...

## Public Types
enum | LineCap { C_Butt, C_Square, C_Round }
| an enum used to define the basic line cap More...
enum | LineJoin { J_Miter, J_Round, J_Bevel }
| an enum used to define the basic line join More...
enum | GradientType { G_None, G_Axial, G_Linear, G_Radial, G_Rectangular, G_Square, G_Ellipsoid }
| an enum used to define the gradient type More...

## Public Member Functions
| WPSGraphicStyle ()
| constructor More...
| WPSGraphicStyle (WPSGraphicStyle const &)=default
WPSGraphicStyle & | operator= (WPSGraphicStyle const &)=default
virtual | ~WPSGraphicStyle ()
| virtual destructor More...
bool | hasLine () const
| returns true if the border is defined More...
void | setSurfaceColor (WPSColor const &col, float opacity=1)
| set the surface color More...
bool | hasSurfaceColor () const
| returns true if the surface is defined More...
void | setPattern (Pattern const &pat)
| set the pattern More...
bool | hasPattern () const
| returns true if the pattern is defined More...
bool | hasGradient (bool complex=false) const
| returns true if the gradient is defined More...
bool | hasSurface () const
| returns true if the interior surface is defined More...
void | setBackgroundColor (WPSColor const &col, float opacity=1)
| set the background color More...
bool | hasBackgroundColor () const
| returns true if the background is defined More...
void | setShadowColor (WPSColor const &col, float opacity=1)
| set the shadow color More...
bool | hasShadow () const
| returns true if the shadow is defined More...
bool | hasBorders () const
| return true if the frame has some border More...
bool | hasSameBorders () const
| return true if the frame has some border More...
std::vector< WPSBorder > const & | borders () const
| return the frame border: libwps::Left | ... More...
void | resetBorders ()
| reset the border More...
void | setBorders (int wh, WPSBorder const &border)
| sets the cell border: wh=libwps::LeftBit|... More...
void | addTo (librevenge::RVNGPropertyList &pList, bool only1d=false) const
| add all the parameters to the propList excepted the frame parameter: the background and the borders More...
void | addFrameTo (librevenge::RVNGPropertyList &pList) const
| add all the frame parameters to propList: the background and the borders More...
int | cmp (WPSGraphicStyle const &a) const
| compare two styles More...

## Static Public Member Functions
static WPSGraphicStyle | emptyStyle ()
| returns an empty style. More...

## Public Attributes
float | m_lineWidth
| the linewidth More...
std::vector< float > | m_lineDashWidth
| the dash array: a sequence of (fullsize, emptysize) More...
LineCap | m_lineCap
| the line cap More...
LineJoin | m_lineJoin
| the line join More...
float | m_lineOpacity
| the line opacity: 0=transparent More...
WPSColor | m_lineColor
| the line color More...
bool | m_fillRuleEvenOdd
| true if the fill rule is evenod More...
WPSColor | m_surfaceColor
| the surface color More...
float | m_surfaceOpacity
| true if the surface has some color More...
WPSColor | m_shadowColor
| the shadow color More...
float | m_shadowOpacity
| true if the shadow has some color More...
Vec2f | m_shadowOffset
| the shadow offset More...
Pattern | m_pattern
| the pattern if it exists More...
GradientType | m_gradientType
| the gradient type More...
std::vector< GradientStop > | m_gradientStopList
| the list of gradient limits More...
float | m_gradientAngle
| the gradient angle More...
float | m_gradientBorder
| the gradient border opacity More...
Vec2f | m_gradientPercentCenter
| the gradient center More...
float | m_gradientRadius
| the gradient radius More...
bool | m_arrows [2]
| two bool to indicated if extremity has arrow or not More...
WPSColor | m_backgroundColor
| the background color More...
float | m_backgroundOpacity
| true if the background has some color More...
std::vector< WPSBorder > | m_bordersList
| the borders WPSBorder::Pos (for a frame) More...
librevenge::RVNGString | m_frameName
| the frame name More...
librevenge::RVNGString | m_frameNextName
| the frame next name (if there is a link) More...
float | m_rotate
| the rotation More...
bool | m_flip [2]
| two bool to indicated we need to flip the shape or not More...
std::string | m_extra
| extra data More...

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

## Detailed Description

a structure used to define a picture style

Note
  in order to define the internal surface style, first it looks for a gradient, if so it uses it. Then it looks for a pattern. Finally if it found nothing, it uses surfaceColor and surfaceOpacity.

## Member Enumeration Documentation

## ◆ GradientType

enum WPSGraphicStyle::GradientType

an enum used to define the gradient type

Enumerator
G_None |
G_Axial |
G_Linear |
G_Radial |
G_Rectangular |
G_Square |
G_Ellipsoid |

## ◆ LineCap

enum WPSGraphicStyle::LineCap

an enum used to define the basic line cap

Enumerator
C_Butt |
C_Square |
C_Round |

## ◆ LineJoin

enum WPSGraphicStyle::LineJoin

an enum used to define the basic line join

Enumerator
J_Miter |
J_Round |
J_Bevel |

## Constructor & Destructor Documentation

## ◆ WPSGraphicStyle() [1/2]

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

constructor

## ◆ WPSGraphicStyle() [2/2]

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

## ◆ ~WPSGraphicStyle()

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

virtual destructor

## Member Function Documentation

## ◆ addFrameTo()

void WPSGraphicStyle::addFrameTo | ( | librevenge::RVNGPropertyList & | pList | ) | const

add all the frame parameters to propList: the background and the borders

Referenced by WKSContentListener::_openFrame().

## ◆ addTo()

void WPSGraphicStyle::addTo | ( | librevenge::RVNGPropertyList & | pList,
|  | bool | only1d = `false`
| ) |  | const

add all the parameters to the propList excepted the frame parameter: the background and the borders

Referenced by WKSChart::Axis::addStyleTo(), WKSChart::Legend::addStyleTo(), WKSChart::Serie::addStyleTo(), WKSChart::TextZone::addStyleTo(), WKSContentListener::insertPicture(), and WKSChart::sendChart().

## ◆ borders()

std::vector<WPSBorder> const& WPSGraphicStyle::borders | ( |  | ) | const
| inline

return the frame border: libwps::Left | ...

## ◆ cmp()

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

compare two styles

## ◆ emptyStyle()

static WPSGraphicStyle WPSGraphicStyle::emptyStyle | ( |  | ) |
| inline static

returns an empty style.

Can be used to initialize a default frame style...

Referenced by Quattro9Graph::readShape(), Quattro9Graph::readTextboxStyle(), and LotusChart::sendCharts().

## ◆ hasBackgroundColor()

bool WPSGraphicStyle::hasBackgroundColor | ( |  | ) | const
| inline

returns true if the background is defined

## ◆ hasBorders()

bool WPSGraphicStyle::hasBorders | ( |  | ) | const
| inline

return true if the frame has some border

Referenced by addFrameTo(), and operator<<().

## ◆ hasGradient()

bool WPSGraphicStyle::hasGradient | ( | bool | complex = `false` | ) | const
| inline

returns true if the gradient is defined

Referenced by addTo(), hasSurface(), operator<<(), and LotusStyleManager::updateSurfaceStyle().

## ◆ hasLine()

bool WPSGraphicStyle::hasLine | ( |  | ) | const
| inline

returns true if the border is defined

Referenced by addTo().

## ◆ hasPattern()

bool WPSGraphicStyle::hasPattern | ( |  | ) | const
| inline

returns true if the pattern is defined

Referenced by addTo(), hasSurface(), operator<<(), and LotusStyleManager::updateSurfaceStyle().

## ◆ hasSameBorders()

bool WPSGraphicStyle::hasSameBorders | ( |  | ) | const
| inline

return true if the frame has some border

Referenced by addFrameTo().

## ◆ hasShadow()

bool WPSGraphicStyle::hasShadow | ( |  | ) | const
| inline

returns true if the shadow is defined

Referenced by addFrameTo(), addTo(), and operator<<().

## ◆ hasSurface()

bool WPSGraphicStyle::hasSurface | ( |  | ) | const
| inline

returns true if the interior surface is defined

Referenced by addTo(), and WKSContentListener::insertPicture().

## ◆ hasSurfaceColor()

bool WPSGraphicStyle::hasSurfaceColor | ( |  | ) | const
| inline

returns true if the surface is defined

Referenced by hasSurface(), and operator<<().

## ◆ operator=()

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

## ◆ resetBorders()

void WPSGraphicStyle::resetBorders | ( |  | ) |
| inline

reset the border

## ◆ setBackgroundColor()

void WPSGraphicStyle::setBackgroundColor | ( | WPSColor const & | col,
|  | float | opacity = `1`
| ) |  |
| inline

set the background color

Referenced by Quattro9Graph::readTextboxStyle(), and QuattroGraph::sendGraphic().

## ◆ setBorders()

void WPSGraphicStyle::setBorders | ( | int | wh,
|  | WPSBorder const & | border
| ) |  |

sets the cell border: wh=libwps::LeftBit|...

## ◆ setPattern()

void WPSGraphicStyle::setPattern | ( | Pattern const & | pat | ) |
| inline

set the pattern

Referenced by LotusChart::readFramesStyle(), Quattro9Graph::readShapeRec(), WKSChart::Serie::setPrimaryPattern(), and LotusStyleManager::updateSurfaceStyle().

## ◆ setShadowColor()

void WPSGraphicStyle::setShadowColor | ( | WPSColor const & | col,
|  | float | opacity = `1`
| ) |  |
| inline

set the shadow color

Referenced by LotusStyleManager::updateShadowStyle().

## ◆ setSurfaceColor()

void WPSGraphicStyle::setSurfaceColor | ( | WPSColor const & | col,
|  | float | opacity = `1`
| ) |  |
| inline

set the surface color

Referenced by LotusChart::readFramesStyle(), Quattro9Graph::readShapeRec(), WKSChart::Serie::Serie(), WKSChart::Serie::setPrimaryColor(), and LotusStyleManager::updateSurfaceStyle().

## Friends And Related Function Documentation

## ◆ operator<<

std::ostream& operator<< | ( | std::ostream & | o,
|  | WPSGraphicStyle const & | st
| ) |  |
| friend

a print operator

## Member Data Documentation

## ◆ m_arrows

bool WPSGraphicStyle::m_arrows[2]

two bool to indicated if extremity has arrow or not

Referenced by addTo(), cmp(), operator<<(), LotusGraph::readGraphic(), Quattro9Graph::readShapeRec(), LotusGraph::sendGraphics(), LotusGraph::sendZone(), and WPSGraphicStyle().

## ◆ m_backgroundColor

WPSColor WPSGraphicStyle::m_backgroundColor

the background color

Referenced by addFrameTo(), cmp(), operator<<(), and setBackgroundColor().

## ◆ m_backgroundOpacity

float WPSGraphicStyle::m_backgroundOpacity

true if the background has some color

Referenced by addFrameTo(), cmp(), hasBackgroundColor(), operator<<(), and setBackgroundColor().

## ◆ m_bordersList

std::vector<WPSBorder> WPSGraphicStyle::m_bordersList

the borders WPSBorder::Pos (for a frame)

Referenced by addFrameTo(), borders(), cmp(), hasBorders(), hasSameBorders(), operator<<(), resetBorders(), and setBorders().

## ◆ m_extra

std::string WPSGraphicStyle::m_extra

extra data

Referenced by operator<<().

## ◆ m_fillRuleEvenOdd

bool WPSGraphicStyle::m_fillRuleEvenOdd

true if the fill rule is evenod

Referenced by addTo(), cmp(), and operator<<().

## ◆ m_flip

bool WPSGraphicStyle::m_flip[2]

two bool to indicated we need to flip the shape or not

Referenced by cmp(), operator<<(), and WPSGraphicStyle().

## ◆ m_frameName

librevenge::RVNGString WPSGraphicStyle::m_frameName

the frame name

Referenced by addFrameTo(), cmp(), WKSContentListener::insertChart(), and operator<<().

## ◆ m_frameNextName

librevenge::RVNGString WPSGraphicStyle::m_frameNextName

the frame next name (if there is a link)

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

## ◆ m_gradientAngle

float WPSGraphicStyle::m_gradientAngle

the gradient angle

Referenced by addTo(), cmp(), operator<<(), Quattro9Graph::readShapeRec(), and LotusStyleManager::updateSurfaceStyle().

## ◆ m_gradientBorder

float WPSGraphicStyle::m_gradientBorder

the gradient border opacity

Referenced by addTo(), cmp(), and operator<<().

## ◆ m_gradientPercentCenter

Vec2f WPSGraphicStyle::m_gradientPercentCenter

the gradient center

Referenced by addTo(), cmp(), operator<<(), and Quattro9Graph::readShapeRec().

## ◆ m_gradientRadius

float WPSGraphicStyle::m_gradientRadius

the gradient radius

Referenced by addTo(), cmp(), and operator<<().

## ◆ m_gradientStopList

std::vector<GradientStop> WPSGraphicStyle::m_gradientStopList

the list of gradient limits

Referenced by addTo(), cmp(), hasGradient(), operator<<(), Quattro9Graph::readShapeRec(), LotusStyleManager::updateSurfaceStyle(), and WPSGraphicStyle().

## ◆ m_gradientType

GradientType WPSGraphicStyle::m_gradientType

the gradient type

Referenced by addTo(), cmp(), hasGradient(), operator<<(), Quattro9Graph::readShapeRec(), and LotusStyleManager::updateSurfaceStyle().

## ◆ m_lineCap

LineCap WPSGraphicStyle::m_lineCap

the line cap

Referenced by addTo(), cmp(), and operator<<().

## ◆ m_lineColor

WPSColor WPSGraphicStyle::m_lineColor

the line color

Referenced by addTo(), cmp(), operator<<(), LotusChart::readFramesStyle(), LotusGraph::readGraphic(), Quattro9Graph::readShapeRec(), WKSChart::Serie::setPrimaryColor(), WKSChart::Serie::setSecondaryColor(), LotusStyleManager::updateGraphicStyle(), LotusStyleManager::updateLineStyle(), and WKSChart::WKSChart().

## ◆ m_lineDashWidth

std::vector<float> WPSGraphicStyle::m_lineDashWidth

the dash array: a sequence of (fullsize, emptysize)

Referenced by addTo(), cmp(), operator<<(), LotusGraph::readGraphic(), and Quattro9Graph::readShapeRec().

## ◆ m_lineJoin

LineJoin WPSGraphicStyle::m_lineJoin

the line join

Referenced by addTo(), cmp(), operator<<(), and Quattro9Graph::readShapeRec().

## ◆ m_lineOpacity

float WPSGraphicStyle::m_lineOpacity

the line opacity: 0=transparent

Referenced by addTo(), cmp(), hasLine(), and operator<<().

## ◆ m_lineWidth

float WPSGraphicStyle::m_lineWidth

the linewidth

Referenced by addTo(), WKSChart::Axis::Axis(), cmp(), emptyStyle(), hasLine(), operator<<(), LotusChart::readFramesStyle(), LotusGraph::readGraphic(), Quattro9Graph::readShapeRec(), Quattro9Graph::readTextboxStyle(), WKSChart::Serie::Serie(), WKSChart::TextZone::TextZone(), LotusStyleManager::updateGraphicStyle(), and LotusStyleManager::updateLineStyle().

## ◆ m_pattern

Pattern WPSGraphicStyle::m_pattern

the pattern if it exists

Referenced by addTo(), cmp(), hasPattern(), operator<<(), setPattern(), and LotusStyleManager::updateSurfaceStyle().

## ◆ m_rotate

float WPSGraphicStyle::m_rotate

the rotation

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

## ◆ m_shadowColor

WPSColor WPSGraphicStyle::m_shadowColor

the shadow color

Referenced by addFrameTo(), addTo(), cmp(), operator<<(), and setShadowColor().

## ◆ m_shadowOffset

Vec2f WPSGraphicStyle::m_shadowOffset

the shadow offset

Referenced by addFrameTo(), addTo(), cmp(), operator<<(), and LotusStyleManager::updateShadowStyle().

## ◆ m_shadowOpacity

float WPSGraphicStyle::m_shadowOpacity

true if the shadow has some color

Referenced by addFrameTo(), addTo(), cmp(), hasShadow(), operator<<(), and setShadowColor().

## ◆ m_surfaceColor

WPSColor WPSGraphicStyle::m_surfaceColor

the surface color

Referenced by addTo(), cmp(), operator<<(), and setSurfaceColor().

## ◆ m_surfaceOpacity

float WPSGraphicStyle::m_surfaceOpacity

true if the surface has some color

Referenced by addTo(), cmp(), hasSurfaceColor(), operator<<(), and setSurfaceColor().

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

- WPSGraphicStyle.h
- WPSGraphicStyle.cpp