MWAWPictBasic Class Referenceabstract

an abstract class which defines basic picture (a line, a rectangle, ...) More...

#include <MWAWPictBasic.hxx>

Inheritance diagram for MWAWPictBasic:
MWAWPict MWAWPictArc MWAWPictCircle MWAWPictLine MWAWPictPath MWAWPictPolygon MWAWPictRectangle

Public Types

enum  SubType {
  Line, Rectangle, Polygon, Circle,
  Arc, Path
}
 the picture subtype ( line, rectangle, polygon, circle, arc) More...
 
- Public Types inherited from MWAWPict
enum  Type {
  Basic, PictData, Bitmap, OleContainer,
  Unknown
}
 the different picture types: More...
 
enum  ReadResult { MWAW_R_BAD =0, MWAW_R_OK, MWAW_R_OK_EMPTY, MWAW_R_MAYBE }
 an enum to defined the result of a parsing use by some picture's classes which can read their data More...
 

Public Member Functions

virtual ~MWAWPictBasic ()
 virtual destructor More...
 
virtual Type getType () const
 returns the picture type More...
 
virtual SubType getSubType () const =0
 returns the picture subtype More...
 
void setLineWidth (float w)
 sets the line width (by default 1.0) More...
 
void setLineColor (MWAWColor const col)
 sets the line color. More...
 
void setSurfaceColor (MWAWColor const col, bool hasColor=true)
 sets the surface color. More...
 
bool hasSurfaceColor () const
 
virtual bool getBinary (WPXBinaryData &data, std::string &s) const
 returns the final representation in encoded odg (if possible) More...
 
virtual bool getODGBinary (WPXBinaryData &) const
 virtual function which tries to convert the picture in ODG and put the result in a WPXBinaryData More...
 
virtual int cmp (MWAWPict const &a) const
 a virtual function used to obtain a strict order. More...
 
- Public Member Functions inherited from MWAWPict
virtual ~MWAWPict ()
 virtual destructor More...
 
Box2f getBdBox () const
 returns the bdbox of the picture More...
 
void setBdBox (Box2f const &box)
 sets the bdbox of the picture More...
 

Protected Member Functions

virtual void getGraphicStyleProperty (WPXPropertyList &list) const =0
 function to implement in subclass in order to get the graphics style More...
 
void getStyle1DProperty (WPXPropertyList &list) const
 returns the basic style property for 1D form (line, ...) More...
 
void getStyle2DProperty (WPXPropertyList &list) const
 returns the basic style property for 2D form (line, ...) More...
 
void startODG (MWAWPropertyHandlerEncoder &doc) const
 adds the odg header knowing the minPt and the maxPt More...
 
void endODG (MWAWPropertyHandlerEncoder &doc) const
 adds the odg footer More...
 
void extendBDBox (float val, int id)
 a function to extend the bdbox More...
 
 MWAWPictBasic ()
 protected constructor must not be called directly More...
 
 MWAWPictBasic (MWAWPictBasic const &p)
 protected constructor must not be called directly More...
 
MWAWPictBasicoperator= (MWAWPictBasic const &p)
 protected= must not be called directly More...
 
- Protected Member Functions inherited from MWAWPict
void extendBDBox (float val)
 udaptes the bdbox, by extended it by (val-previousVal) More...
 
 MWAWPict ()
 protected constructor must not be called directly More...
 
 MWAWPict (MWAWPict const &p)
 protected constructor must not be called directly More...
 
MWAWPictoperator= (MWAWPict const &p)
 protected operator= must not be called directly More...
 

Private Attributes

float m_lineWidth
 the linewidth More...
 
MWAWColor m_lineColor
 the line color More...
 
MWAWColor m_surfaceColor
 the line color More...
 
bool m_surfaceHasColor
 true if the surface has some color More...
 
float m_extend [2]
 m_extend[0]: from lineWidth, m_extend[1]: came from extra data More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from MWAWPict
static Box2f getBdBox (int numPt, Vec2f const *pt)
 computes the minimum and maximum of a list of point More...
 

Detailed Description

an abstract class which defines basic picture (a line, a rectangle, ...)

Member Enumeration Documentation

the picture subtype ( line, rectangle, polygon, circle, arc)

Enumerator
Line 
Rectangle 
Polygon 
Circle 
Arc 
Path 

Constructor & Destructor Documentation

virtual MWAWPictBasic::~MWAWPictBasic ( )
inlinevirtual

virtual destructor

MWAWPictBasic::MWAWPictBasic ( )
inlineprotected

protected constructor must not be called directly

MWAWPictBasic::MWAWPictBasic ( MWAWPictBasic const &  p)
inlineprotected

protected constructor must not be called directly

Member Function Documentation

virtual int MWAWPictBasic::cmp ( MWAWPict const &  a) const
inlinevirtual

a virtual function used to obtain a strict order.

  • must be redefined in the subs class

Reimplemented from MWAWPict.

Reimplemented in MWAWPictPolygon, MWAWPictPath, MWAWPictArc, MWAWPictCircle, MWAWPictRectangle, and MWAWPictLine.

Referenced by MWAWPictLine::cmp(), MWAWPictRectangle::cmp(), MWAWPictCircle::cmp(), MWAWPictArc::cmp(), MWAWPictPath::cmp(), and MWAWPictPolygon::cmp().

void MWAWPictBasic::extendBDBox ( float  val,
int  id 
)
inlineprotected

a function to extend the bdbox

Referenced by MWAWPictLine::setArrow(), and setLineWidth().

virtual bool MWAWPictBasic::getBinary ( WPXBinaryData &  data,
std::string &  s 
) const
inlinevirtual

returns the final representation in encoded odg (if possible)

Reimplemented from MWAWPict.

Referenced by MRWGraph::sendRule().

virtual void MWAWPictBasic::getGraphicStyleProperty ( WPXPropertyList &  list) const
protectedpure virtual

function to implement in subclass in order to get the graphics style

Implemented in MWAWPictPolygon, MWAWPictPath, MWAWPictArc, MWAWPictCircle, MWAWPictRectangle, and MWAWPictLine.

Referenced by startODG().

virtual bool MWAWPictBasic::getODGBinary ( WPXBinaryData &  ) const
inlinevirtual

virtual function which tries to convert the picture in ODG and put the result in a WPXBinaryData

Reimplemented in MWAWPictPolygon, MWAWPictPath, MWAWPictArc, MWAWPictCircle, MWAWPictRectangle, and MWAWPictLine.

Referenced by getBinary().

void MWAWPictBasic::getStyle1DProperty ( WPXPropertyList &  list) const
protected
void MWAWPictBasic::getStyle2DProperty ( WPXPropertyList &  list) const
protected
virtual SubType MWAWPictBasic::getSubType ( ) const
pure virtual

returns the picture subtype

Implemented in MWAWPictPolygon, MWAWPictPath, MWAWPictArc, MWAWPictCircle, MWAWPictRectangle, and MWAWPictLine.

Referenced by cmp().

virtual Type MWAWPictBasic::getType ( ) const
inlinevirtual

returns the picture type

Implements MWAWPict.

bool MWAWPictBasic::hasSurfaceColor ( ) const
inline
MWAWPictBasic& MWAWPictBasic::operator= ( MWAWPictBasic const &  p)
inlineprotected

protected= must not be called directly

void MWAWPictBasic::setLineColor ( MWAWColor const  col)
inline

sets the line color.

default values : black

Referenced by MSKGraphInternal::BasicForm::getBinaryData(), and MRWGraph::sendRule().

void MWAWPictBasic::setLineWidth ( float  w)
inline

sets the line width (by default 1.0)

Referenced by MSKGraphInternal::BasicForm::getBinaryData(), MWAWPictBasic(), and MRWGraph::sendRule().

void MWAWPictBasic::setSurfaceColor ( MWAWColor const  col,
bool  hasColor = true 
)
inline

sets the surface color.

default value white

Referenced by MSKGraphInternal::BasicForm::getBinaryData().

void MWAWPictBasic::startODG ( MWAWPropertyHandlerEncoder doc) const
protected

Member Data Documentation

float MWAWPictBasic::m_extend[2]
private

m_extend[0]: from lineWidth, m_extend[1]: came from extra data

Referenced by cmp(), extendBDBox(), MWAWPictBasic(), and operator=().

MWAWColor MWAWPictBasic::m_lineColor
private

the line color

Referenced by cmp(), getStyle1DProperty(), operator=(), and setLineColor().

float MWAWPictBasic::m_lineWidth
private

the linewidth

Referenced by cmp(), getStyle1DProperty(), operator=(), and setLineWidth().

MWAWColor MWAWPictBasic::m_surfaceColor
private

the line color

Referenced by cmp(), getStyle2DProperty(), operator=(), and setSurfaceColor().

bool MWAWPictBasic::m_surfaceHasColor
private

true if the surface has some color

Referenced by cmp(), getStyle2DProperty(), hasSurfaceColor(), operator=(), and setSurfaceColor().


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

Generated on Tue Apr 30 2013 06:31:19 for libmwaw by doxygen 1.8.3.1