MWAWGraphicStyle Class Reference

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

#include <MWAWGraphicStyle.hxx>

Inheritance diagram for MWAWGraphicStyle:
CWGraphInternal::Style MSKGraph::Style

List of all members.

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
virtual ~MWAWGraphicStyle ()
 virtual destructor
bool hasLine () const
 returns true if the border is defined
void setSurfaceColor (MWAWColor const &col, float opacity=1)
 set the surface color
bool hasSurfaceColor () const
 returns true if the surface is defined
void setPattern (Pattern const &pat)
 set the pattern
bool hasPattern () const
 returns true if the pattern is defined
bool hasGradient (bool complex=false) const
 returns true if the gradient is defined
bool hasSurface () const
 returns true if the interior surface is defined
void setShadowColor (MWAWColor const &col, float opacity=1)
 set the shadow color
bool hasShadow () const
 returns true if the shadow is defined
void addTo (WPXPropertyList &pList, WPXPropertyListVector &gradient, bool only1d=false) const
 add to propList
int cmp (MWAWGraphicStyle const &a) const
 compare two styles

Public Attributes

float m_lineWidth
 the linewidth
std::vector< float > m_lineDashWidth
 the dash array: a sequence of (fullsize, emptysize)
LineCap m_lineCap
 the line cap
LineJoin m_lineJoin
 the line join
float m_lineOpacity
 the line opacity: 0=transparent
MWAWColor m_lineColor
 the line color
bool m_fillRuleEvenOdd
 true if the fill rule is evenod
MWAWColor m_surfaceColor
 the surface color
float m_surfaceOpacity
 true if the surface has some color
MWAWColor m_shadowColor
 the shadow color
float m_shadowOpacity
 true if the shadow has some color
Vec2f m_shadowOffset
 the shadow offset
Pattern m_pattern
 the pattern if it exists
GradientType m_gradientType
 the gradient type
std::vector< GradientStopm_gradientStopList
 the list of gradient limits
float m_gradientAngle
 the gradient angle
float m_gradientBorder
 the gradient border opacity
Vec2f m_gradientPercentCenter
 the gradient center
float m_gradientRadius
 the gradient radius
bool m_arrows [2]
 two bool to indicated if extremity has arrow or not
float m_rotate
 the rotation
bool m_flip [2]
 two bool to indicated we need to flip the shape or not
std::string m_extra
 extra data

Friends

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

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

constructor

virtual MWAWGraphicStyle::~MWAWGraphicStyle ( ) [inline, virtual]

virtual destructor


Member Function Documentation

void MWAWGraphicStyle::addTo ( WPXPropertyList &  pList,
WPXPropertyListVector &  gradient,
bool  only1d = false 
) const
int MWAWGraphicStyle::cmp ( MWAWGraphicStyle const &  a) const

compare two styles

bool MWAWGraphicStyle::hasGradient ( bool  complex = false) const [inline]
bool MWAWGraphicStyle::hasShadow ( ) const [inline]

returns true if the shadow is defined

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

bool MWAWGraphicStyle::hasSurface ( ) const [inline]

returns true if the interior surface is defined

Referenced by addTo(), and MWAWGraphicShape::send().

void MWAWGraphicStyle::setPattern ( Pattern const &  pat) [inline]

set the pattern

Referenced by GWGraph::readStyle(), and MRWGraph::sendRule().

void MWAWGraphicStyle::setShadowColor ( MWAWColor const &  col,
float  opacity = 1 
) [inline]

set the shadow color


Friends And Related Function Documentation

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

a print operator


Member Data Documentation

true if the fill rule is evenod

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

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

Referenced by cmp(), GWGraphInternal::FrameText::getStyle(), MWAWGraphicListener::insertTextBox(), MWAWGraphicStyle(), and operator<<().

the gradient border opacity

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

the gradient radius

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

the line cap

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

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

Referenced by addTo(), cmp(), operator<<(), GWGraph::readStyle(), and GWGraphInternal::FrameShape::updateStyle().

the line join

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

the shadow offset

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

true if the shadow has some color

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


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