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  Arrow
 a structure used to define an arrow More...
 
struct  Gradient
 a basic gradient used in a MWAWGraphicStyle More...
 
struct  Hatch
 a basic hatch used in MWAWGraphicStyle 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  VerticalAlignment {
  V_AlignBottom, V_AlignCenter, V_AlignJustify, V_AlignTop,
  V_AlignDefault
}
 an enum used to define the vertical alignment More...
 

Public Member Functions

 MWAWGraphicStyle ()
 constructor More...
 
 MWAWGraphicStyle (MWAWGraphicStyle const &)=default
 
MWAWGraphicStyleoperator= (MWAWGraphicStyle const &)=default
 
MWAWGraphicStyleoperator= (MWAWGraphicStyle &&)=default
 
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, float opacity=1)
 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 hasHatch () const
 returns true if the hatch 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

std::vector< float > m_lineDashWidth
 the dash array: a sequence of (fullsize, emptysize) More...
 
float m_lineWidth
 the linewidth 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...
 
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...
 
Gradient m_gradient
 the gradient More...
 
Hatch m_hatch
 the hatch More...
 
MWAWColor m_backgroundColor
 the background color More...
 
float m_backgroundOpacity
 true if the background has some color More...
 
float m_rotate
 the rotation 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...
 
Arrow m_arrows [2]
 the two arrows corresponding to start and end extremity More...
 
bool m_flip [2]
 two bool to indicated we need to flip the shape or not More...
 
bool m_fillRuleEvenOdd
 true if the fill rule is evenod More...
 
bool m_doNotPrint
 a bool to know if the shape must not be printed More...
 
VerticalAlignment m_verticalAlignment
 related to text area 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

◆ LineCap

an enum used to define the basic line cap

Enumerator
C_Butt 
C_Square 
C_Round 

◆ LineJoin

an enum used to define the basic line join

Enumerator
J_Miter 
J_Round 
J_Bevel 

◆ VerticalAlignment

an enum used to define the vertical alignment

Note
actually mainly used for text box
Enumerator
V_AlignBottom 
V_AlignCenter 
V_AlignJustify 
V_AlignTop 
V_AlignDefault 

Constructor & Destructor Documentation

◆ MWAWGraphicStyle() [1/2]

MWAWGraphicStyle::MWAWGraphicStyle ( )
inline

constructor

◆ MWAWGraphicStyle() [2/2]

MWAWGraphicStyle::MWAWGraphicStyle ( MWAWGraphicStyle const &  )
default

◆ ~MWAWGraphicStyle()

MWAWGraphicStyle::~MWAWGraphicStyle ( )
virtual

virtual destructor

Member Function Documentation

◆ addFrameTo()

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().

◆ addTo()

void MWAWGraphicStyle::addTo ( librevenge::RVNGPropertyList &  pList,
bool  only1d = false 
) const

◆ borders()

std::vector<MWAWBorder> const& MWAWGraphicStyle::borders ( ) const
inline

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

◆ cmp()

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

compare two styles

◆ emptyStyle()

◆ hasBackgroundColor()

bool MWAWGraphicStyle::hasBackgroundColor ( ) const
inline

returns true if the background is defined

◆ hasBorders()

bool MWAWGraphicStyle::hasBorders ( ) const
inline

return true if the frame has some border

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

◆ hasGradient()

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

◆ hasHatch()

bool MWAWGraphicStyle::hasHatch ( ) const
inline

returns true if the hatch is defined

Referenced by MWAWGraphicStyle::Hatch::addTo(), addTo(), hasSurface(), and operator<<().

◆ hasLine()

◆ hasPattern()

bool MWAWGraphicStyle::hasPattern ( ) const
inline

returns true if the pattern is defined

Referenced by addTo(), hasSurface(), operator<<(), HanMacWrdKGraph::sendFrame(), and GreatWksGraph::sendTextbox().

◆ hasSameBorders()

bool MWAWGraphicStyle::hasSameBorders ( ) const
inline

return true if the frame has some border

Referenced by addFrameTo().

◆ hasShadow()

bool MWAWGraphicStyle::hasShadow ( ) const
inline

returns true if the shadow is defined

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

◆ hasSurface()

◆ hasSurfaceColor()

◆ operator=() [1/2]

MWAWGraphicStyle& MWAWGraphicStyle::operator= ( MWAWGraphicStyle const &  )
default

◆ operator=() [2/2]

MWAWGraphicStyle& MWAWGraphicStyle::operator= ( MWAWGraphicStyle &&  )
default

◆ resetBorders()

void MWAWGraphicStyle::resetBorders ( )
inline

reset the border

Referenced by PowerPoint1Parser::readFramesList().

◆ setBackgroundColor()

◆ setBorders()

◆ setPattern()

◆ setShadowColor()

◆ setSurfaceColor()

Friends And Related Function Documentation

◆ operator<<

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

a print operator

Member Data Documentation

◆ m_arrows

◆ m_backgroundColor

MWAWColor MWAWGraphicStyle::m_backgroundColor

the background color

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

◆ m_backgroundOpacity

float MWAWGraphicStyle::m_backgroundOpacity

◆ m_bordersList

std::vector<MWAWBorder> MWAWGraphicStyle::m_bordersList

the borders MWAWBorder::Pos (for a frame)

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

◆ m_doNotPrint

bool MWAWGraphicStyle::m_doNotPrint

a bool to know if the shape must not be printed

Referenced by addTo().

◆ m_extra

◆ m_fillRuleEvenOdd

bool MWAWGraphicStyle::m_fillRuleEvenOdd

true if the fill rule is evenod

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

◆ m_flip

◆ m_frameName

◆ m_frameNextName

◆ m_gradient

◆ m_hatch

Hatch MWAWGraphicStyle::m_hatch

◆ m_lineCap

◆ m_lineColor

◆ m_lineDashWidth

◆ m_lineJoin

◆ m_lineOpacity

◆ m_lineWidth

float MWAWGraphicStyle::m_lineWidth

the linewidth

Referenced by HanMacWrdKGraphInternal::TextBox::addTo(), addTo(), MWAWChart::Axis::Axis(), cmp(), emptyStyle(), MWAWGraphicShape::getBdBox(), GreatWksGraphInternal::FrameText::getStyle(), hasLine(), MsWksGraphInternal::BasicShape::needExtraBorderWidth(), operator<<(), BeagleWksSSParser::readChart(), RagTimeParser::readDataZoneHeader(), HanMacWrdKGraph::readFrames(), HanMacWrdJGraph::readFrames(), PowerPoint1Parser::readFramesList(), PowerPoint3Parser::readFramesList(), ClarisWksStyleManager::readGraphStyles(), MacDraftParser::readLabel(), MacDraftParser::readObject(), MacDraft5Parser::readObject(), MsWksGraph::readPictHeader(), CorelPainterParser::readPolygon(), CricketDrawParser::readShape(), SuperPaintParser::readShape(), ScoopParser::readShape(), ReadySetGoParser::readShapeV1(), ReadySetGoParser::readShapeV2(), ReadySetGoParser::readShapeV3(), BeagleWksDRParser::readStyle(), PowerPoint7Graph::readStyle(), GreatWksGraph::readStyle(), ClarisWksTable::readTableCells(), MsWksGraph::send(), RagTimeParser::send(), Canvas5Image::send(), MacDrawProParser::send(), RagTime5Graph::send(), Canvas5Graph::send(), MacDraft5Parser::sendBitmap(), MacDrawProParser::sendBitmap(), HanMacWrdJGraph::sendComment(), CanvasGraph::sendDimension(), MWAWTable::sendExtraLines(), MsWksGraph::sendGroup(), MsWksGraph::sendGroupChild(), RagTimeParser::sendPicture(), BeagleWksDRParser::sendPictures(), MarinerWrtGraph::sendRule(), DrawTableParser::sendShape(), ClarisDrawGraph::sendShape(), CanvasGraph::sendSpecial(), Canvas5Graph::sendSpecial(), MWAWChart::Series::Series(), MWAWChart::TextZone::TextZone(), ClarisWksTableInternal::TableCell::update(), CanvasGraph::update(), MacDraft5StyleManager::updateArrows(), RagTime5StyleManager::updateBorderStyle(), Canvas5StyleManager::updateLine(), MacDraft5StyleManager::updateLineStyle(), Canvas5StyleManager::updateLineStyle(), FreeHandParserInternal::State::updateLineStyle(), and ApplePictParserInternal::State::updateStyle().

◆ m_pattern

Pattern MWAWGraphicStyle::m_pattern

the pattern if it exists

Referenced by addTo(), cmp(), hasPattern(), operator<<(), RagTimeParser::readDataZoneHeader(), and setPattern().

◆ m_rotate

◆ m_shadowColor

MWAWColor MWAWGraphicStyle::m_shadowColor

the shadow color

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

◆ m_shadowOffset

◆ m_shadowOpacity

float MWAWGraphicStyle::m_shadowOpacity

true if the shadow has some color

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

◆ m_surfaceColor

◆ m_surfaceOpacity

◆ m_verticalAlignment

VerticalAlignment MWAWGraphicStyle::m_verticalAlignment

related to text area

Referenced by addTo(), cmp(), ReadySetGoParser::readShapeV3(), and ScoopParser::send().


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

Generated for libmwaw by doxygen 1.8.14