40 #ifndef MWAW_PICT_BASIC
41 # define MWAW_PICT_BASIC
105 virtual bool getBinary(WPXBinaryData &data, std::string &s)
const {
107 s =
"image/mwaw-odg";
120 if (diff)
return diff;
125 if (diff)
return (diff < 0) ? -1 : 1;
128 if (diffF < 0)
return -1;
129 if (diffF > 0)
return 1;
135 for (
int c = 0; c < 2; c++) {
137 if (diffF < 0)
return -1;
138 if (diffF > 0)
return 1;
162 assert(
id>=0&&
id<=1);
169 for (
int c = 0; c < 2; c++)
m_extend[c]=0;
178 if (&p ==
this)
return *
this;
216 assert(v>=0 && v<=1);
234 if (diff)
return diff;
236 for (
int c = 0; c < 2; c++) {
238 if (diff)
return diff;
240 for (
int c = 0; c < 2; c++) {
242 if (diff)
return (diff < 0) ? -1 : 1;
290 if (diff)
return diff;
292 for (
int i = 0; i < 2; i++) {
294 if (diff)
return (diff < 0) ? -1 : 1;
362 if (diff)
return diff;
366 if (diff)
return diff;
367 for (
int c = 0; c < 2; c++) {
369 if (diffF < 0)
return -1;
370 if (diffF > 0)
return 1;
406 if (diff)
return diff;
410 if (diff)
return diff;
443 if (diff)
return diff;
453 if (diff)
return diff;
MWAWPictBasic & operator=(MWAWPictBasic const &p)
protected= must not be called directly
Definition: MWAWPictBasic.hxx:177
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:300
void setSurfaceColor(MWAWColor const &col, bool hasColor=true)
sets the surface color.
Definition: MWAWPictBasic.hxx:96
Definition: MWAWPictBasic.hxx:76
float m_extend[2]
m_extend[0]: from lineWidth, m_extend[1]: came from extra data
Definition: MWAWPictBasic.hxx:198
MWAWPictPath(Box2f bdBox, std::string path)
constructor: bdbox followed by the path definition
Definition: MWAWPictBasic.hxx:387
a class used to define a generic path ( a bezier curve, ... )
Definition: MWAWPictBasic.hxx:383
MWAWPictArc(Box2f box, Box2f ellBox, float ang1, float ang2)
constructor: bdbox followed by the bdbox of the circle and 2 angles exprimed in degree ...
Definition: MWAWPictBasic.hxx:341
virtual ~MWAWPictRectangle()
virtual destructor
Definition: MWAWPictBasic.hxx:264
void setLineWidth(float w)
sets the line width (by default 1.0)
Definition: MWAWPictBasic.hxx:85
void setLineColor(MWAWColor const &col)
sets the line color.
Definition: MWAWPictBasic.hxx:91
a class used to define an arc
Definition: MWAWPictBasic.hxx:336
int cmp(Box2< T > const &p) const
comparison function : fist sorts min by Y,X values then max extremity
Definition: libmwaw_internal.hxx:841
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:327
virtual ~MWAWPictPath()
virtual destructor
Definition: MWAWPictBasic.hxx:391
MWAWPictCircle(Box2f box)
constructor
Definition: MWAWPictBasic.hxx:310
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:282
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:186
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order.
Definition: MWAWPictBasic.hxx:118
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:340
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:226
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:262
bool hasSurfaceColor() const
Definition: MWAWPictBasic.hxx:100
MWAWColor m_lineColor
the line color
Definition: MWAWPictBasic.hxx:192
Definition: MWAWPictBasic.hxx:76
MWAWPictLine(Vec2f orig, Vec2f end)
constructor
Definition: MWAWPictBasic.hxx:206
write in WPXBinaryData a list of tags/and properties
Definition: MWAWPropertyHandler.hxx:82
float m_angle[2]
the two angles
Definition: MWAWPictBasic.hxx:379
Box2f m_rectBox
corner point
Definition: MWAWPictBasic.hxx:302
MWAWPictPolygon(Box2f bdBox, std::vector< Vec2f > const &lVect)
constructor: bdbox followed by the bdbox of the circle and 2 angl exprimed in degree ...
Definition: MWAWPictBasic.hxx:424
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:354
the class to store a color
Definition: libmwaw_internal.hxx:161
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPict.hxx:102
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:107
Definition: MWAWPictBasic.hxx:76
a class used to define a polygon
Definition: MWAWPictBasic.hxx:419
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:435
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:287
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:288
virtual ~MWAWPictLine()
virtual destructor
Definition: MWAWPictBasic.hxx:213
SubType
the picture subtype ( line, rectangle, polygon, circle, arc)
Definition: MWAWPictBasic.hxx:76
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:404
void getStyle2DProperty(WPXPropertyList &list) const
returns the basic style property for 2D form (line, ...)
Definition: MWAWPictBasic.cxx:91
void setRoundCornerWidth(int w)
sets the corner width
Definition: MWAWPictBasic.hxx:267
virtual SubType getSubType() const =0
returns the picture subtype
virtual bool getODGBinary(WPXBinaryData &) const
virtual function which tries to convert the picture in ODG and put the result in a WPXBinaryData ...
Definition: MWAWPictBasic.hxx:111
Definition: MWAWPictBasic.hxx:76
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:321
bool m_arrows[2]
two bool to indicated if extremity has arrow or not
Definition: MWAWPictBasic.hxx:251
int m_cornerWidth[2]
an int used to define round corner
Definition: MWAWPictBasic.hxx:300
MWAWPictBasic()
protected constructor must not be called directly
Definition: MWAWPictBasic.hxx:168
Definition: MWAWPictBasic.hxx:76
std::vector< Vec2f > m_verticesList
the vertices list
Definition: MWAWPictBasic.hxx:459
Definition: MWAWPict.hxx:67
virtual ~MWAWPictArc()
virtual destructor
Definition: MWAWPictBasic.hxx:347
virtual ~MWAWPictCircle()
virtual destructor
Definition: MWAWPictBasic.hxx:314
Definition: MWAWPictBasic.hxx:76
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:149
void setBdBox(Box2f const &box)
sets the bdbox of the picture
Definition: MWAWPict.hxx:87
Type
the different picture types:
Definition: MWAWPict.hxx:67
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:209
virtual void getGraphicStyleProperty(WPXPropertyList &list) const =0
function to implement in subclass in order to get the graphics style
void extendBDBox(float val, int id)
a function to extend the bdbox
Definition: MWAWPictBasic.hxx:161
int cmpY(Vec2< T > const &p) const
a comparison function: which first compares y then x
Definition: libmwaw_internal.hxx:528
a class used to define a circle or an ellipse
Definition: MWAWPictBasic.hxx:306
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:176
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:360
void endODG(MWAWPropertyHandlerEncoder &doc) const
adds the odg footer
Definition: MWAWPictBasic.cxx:74
void getStyle1DProperty(WPXPropertyList &list) const
returns the basic style property for 1D form (line, ...)
Definition: MWAWPictBasic.cxx:78
virtual Type getType() const
returns the picture type
Definition: MWAWPictBasic.hxx:78
void startODG(MWAWPropertyHandlerEncoder &doc) const
adds the odg header knowing the minPt and the maxPt
Definition: MWAWPictBasic.cxx:59
virtual ~MWAWPictBasic()
virtual destructor
Definition: MWAWPictBasic.hxx:73
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:232
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:219
Box2f m_circleBox
corner ellipse rectangle point
Definition: MWAWPictBasic.hxx:376
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:130
MWAWPictBasic(MWAWPictBasic const &p)
protected constructor must not be called directly
Definition: MWAWPictBasic.hxx:173
std::string m_path
the string represented the path (in svg)
Definition: MWAWPictBasic.hxx:415
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:398
Box2f m_circleBox
Definition: MWAWPictBasic.hxx:332
virtual ~MWAWPictPolygon()
virtual destructor
Definition: MWAWPictBasic.hxx:428
a class to store a simple line
Definition: MWAWPictBasic.hxx:202
Box2f getBdBox() const
returns the bdbox of the picture
Definition: MWAWPict.hxx:80
MWAWColor m_surfaceColor
the line color
Definition: MWAWPictBasic.hxx:194
virtual bool getBinary(WPXBinaryData &data, std::string &s) const
returns the final representation in encoded odg (if possible)
Definition: MWAWPictBasic.hxx:105
bool m_surfaceHasColor
true if the surface has some color
Definition: MWAWPictBasic.hxx:196
MWAWPictRectangle(Box2f box)
constructor
Definition: MWAWPictBasic.hxx:259
Vec2f m_extremity[2]
the extremity coordinate
Definition: MWAWPictBasic.hxx:249
an abstract class which defines basic picture (a line, a rectangle, ...)
Definition: MWAWPictBasic.hxx:69
void setRoundCornerWidth(int xw, int yw)
sets the corner width
Definition: MWAWPictBasic.hxx:272
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:441
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:249
void extendBDBox(float val)
udaptes the bdbox, by extended it by (val-previousVal)
Definition: MWAWPict.hxx:136
a class to define a rectangle (or a rectangle with round corner)
Definition: MWAWPictBasic.hxx:255
float m_lineWidth
the linewidth
Definition: MWAWPictBasic.hxx:190
void setArrow(int v, bool val)
sets the arrow: orig(v=0), end(v=1)
Definition: MWAWPictBasic.hxx:215
Generic function used to define/store a picture.
Definition: MWAWPict.hxx:53
MWAWPict & operator=(MWAWPict const &p)
protected operator= must not be called directly
Definition: MWAWPict.hxx:147