MWAWGraphicStyle Class Reference

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

#include <MWAWGraphicStyle.hxx>

Inheritance diagram for MWAWGraphicStyle:
ClarisDrawGraphInternal::Style ClarisWksGraphInternal::Style MsWksGraph::Style

Classes

struct  GradientStop
 a structure used to define the gradient limit More...
 
struct  Pattern
 a basic pattern used in a MWAWGraphicStyle: 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

 MWAWGraphicStyle ()
 constructor More...
 
virtual ~MWAWGraphicStyle ()
 virtual destructor More...
 
bool hasLine () const
 returns true if the border is defined More...
 
void setSurfaceColor (MWAWColor 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 (MWAWColor const &col, float opacity=1)
 set the background color More...
 
bool hasBackgroundColor () const
 returns true if the background is defined More...
 
void setShadowColor (MWAWColor 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< MWAWBorder > const & borders () const
 return the frame border: libmwaw::Left | ... More...
 
void resetBorders ()
 reset the border More...
 
void setBorders (int wh, MWAWBorder const &border)
 sets the cell border: wh=libmwaw::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 (MWAWGraphicStyle const &a) const
 compare two styles More...
 

Static Public Member Functions

static MWAWGraphicStyle 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...
 
MWAWColor m_lineColor
 the line color More...
 
bool m_fillRuleEvenOdd
 true if the fill rule is evenod More...
 
MWAWColor m_surfaceColor
 the surface color More...
 
float m_surfaceOpacity
 true if the surface has some color More...
 
MWAWColor m_shadowColor
 the shadow color More...
 
float m_shadowOpacity
 true if the shadow has some color More...
 
MWAWVec2f m_shadowOffset
 the shadow offset More...
 
Pattern m_pattern
 the pattern if it exists More...
 
GradientType m_gradientType
 the gradient type More...
 
std::vector< GradientStopm_gradientStopList
 the list of gradient limits More...
 
float m_gradientAngle
 the gradient angle More...
 
float m_gradientBorder
 the gradient border opacity More...
 
MWAWVec2f 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...
 
MWAWColor m_backgroundColor
 the background color More...
 
float m_backgroundOpacity
 true if the background has some color More...
 
std::vector< MWAWBorderm_bordersList
 the borders MWAWBorder::Pos (for a frame) More...
 
std::string m_frameName
 the frame name More...
 
std::string 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, MWAWGraphicStyle 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

an enum used to define the gradient type

Enumerator
G_None 
G_Axial 
G_Linear 
G_Radial 
G_Rectangular 
G_Square 
G_Ellipsoid 

an enum used to define the basic line cap

Enumerator
C_Butt 
C_Square 
C_Round 

an enum used to define the basic line join

Enumerator
J_Miter 
J_Round 
J_Bevel 

Constructor & Destructor Documentation

MWAWGraphicStyle::MWAWGraphicStyle ( )
inline

constructor

virtual MWAWGraphicStyle::~MWAWGraphicStyle ( )
inlinevirtual

virtual destructor

Member Function Documentation

void MWAWGraphicStyle::addFrameTo ( librevenge::RVNGPropertyList &  pList) const

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

Referenced by MWAWTextListener::openFrame(), and MWAWSpreadsheetListener::openFrame().

void MWAWGraphicStyle::addTo ( librevenge::RVNGPropertyList &  pList,
bool  only1d = false 
) const
std::vector<MWAWBorder> const& MWAWGraphicStyle::borders ( ) const
inline

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

int MWAWGraphicStyle::cmp ( MWAWGraphicStyle const &  a) const

compare two styles

bool MWAWGraphicStyle::hasBackgroundColor ( ) const
inline

returns true if the background is defined

bool MWAWGraphicStyle::hasBorders ( ) const
inline

return true if the frame has some border

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

bool MWAWGraphicStyle::hasGradient ( bool  complex = false) const
inline
bool MWAWGraphicStyle::hasPattern ( ) const
inline
bool MWAWGraphicStyle::hasSameBorders ( ) const
inline

return true if the frame has some border

Referenced by addFrameTo().

bool MWAWGraphicStyle::hasShadow ( ) const
inline

returns true if the shadow is defined

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

bool MWAWGraphicStyle::hasSurface ( ) const
inline
void MWAWGraphicStyle::resetBorders ( )
inline

reset the border

void MWAWGraphicStyle::setPattern ( Pattern const &  pat)
inline
void MWAWGraphicStyle::setShadowColor ( MWAWColor const &  col,
float  opacity = 1 
)
inline

Friends And Related Function Documentation

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

a print operator

Member Data Documentation

MWAWColor MWAWGraphicStyle::m_backgroundColor

the background color

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

float MWAWGraphicStyle::m_backgroundOpacity
std::vector<MWAWBorder> MWAWGraphicStyle::m_bordersList

the borders MWAWBorder::Pos (for a frame)

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

bool MWAWGraphicStyle::m_fillRuleEvenOdd

true if the fill rule is evenod

Referenced by addTo(), cmp(), operator<<(), and MsWksGraph::Style::Style().

float MWAWGraphicStyle::m_gradientBorder

the gradient border opacity

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

float MWAWGraphicStyle::m_gradientRadius

the gradient radius

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

LineCap MWAWGraphicStyle::m_lineCap

the line cap

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

std::vector<float> MWAWGraphicStyle::m_lineDashWidth
LineJoin MWAWGraphicStyle::m_lineJoin

the line join

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

MWAWColor MWAWGraphicStyle::m_shadowColor

the shadow color

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

float MWAWGraphicStyle::m_shadowOpacity

true if the shadow has some color

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


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

Generated on Thu Jul 9 2015 20:26:39 for libmwaw by doxygen 1.8.8