MWAWPictBasic.hxx
Go to the documentation of this file.
/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
/* libmwaw
* Version: MPL 2.0 / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
* Copyright (C) 2006, 2007 Andrew Ziem
* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
*
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
* in which case the provisions of the LGPLv2+ are applicable
* instead of those above.
*/
/* This header contains code specific to manage basic picture (line, rectangle, ...)
*
* Note: all unit are points
*
*/
#ifndef MWAW_PICT_BASIC
# define MWAW_PICT_BASIC
# include <assert.h>
# include <ostream>
# include <string>
# include <vector>
# include "libmwaw_internal.hxx"
# include "MWAWPict.hxx"
class MWAWPropertyHandlerEncoder;
/*
libmwaw:document w="..pt" h="..pt"
libmwaw:graphicStyle lineColor="#......" lineWidth="..pt" lineFill="solid/none"
surfaceColor="#......" surfaceFill="solid/none"
startArrow="true/false" startArrowWidth="..pt"
endArrow="true/false" endArrowWidth="..pt" /
libmwaw:drawLine x0=".." y0=".." x1=".." y1=".." /
libmwaw:drawRectangle x0=".." y0=".." w=".." h=".." [ rw=".." rh=".." ] /
libmwaw:drawCircle x0=".." y0=".." w=".." h=".." /
libmwaw:drawArc x0=".." y0=".." w=".." h=".." angle0=".." angle1=".." /
libmwaw:drawPolygon x0=".." y0=".." ... x{N-1}=".." y{N-1}=".." w=".." h=".." /
libmwaw:drawPath path=".." w=".." h=".." /
/libmwaw:document
*/
class MWAWPictBasic: public MWAWPict
{
public:
virtual ~MWAWPictBasic() {}
enum SubType { Line, Rectangle, Polygon, Circle, Arc, Path };
virtual Type getType() const {
return Basic;
}
virtual SubType getSubType() const = 0;
void setLineWidth(float w) {
m_lineWidth = w;
extendBDBox(m_lineWidth, 0);
}
void setLineColor(MWAWColor const &col) {
m_lineColor = col;
}
void setSurfaceColor(MWAWColor const &col, bool hasColor = true) {
m_surfaceColor = col;
m_surfaceHasColor = hasColor;
}
bool hasSurfaceColor() const {
return m_surfaceHasColor;
}
virtual bool getBinary(WPXBinaryData &data, std::string &s) const {
if (!getODGBinary(data)) return false;
s = "image/mwaw-odg";
return true;
}
virtual bool getODGBinary(WPXBinaryData &) const {
return false;
}
virtual int cmp(MWAWPict const &a) const {
int diff = MWAWPict::cmp(a);
if (diff) return diff;
MWAWPictBasic const &aPict = static_cast<MWAWPictBasic const &>(a);
// the type
diff = getSubType() - aPict.getSubType();
if (diff) return (diff < 0) ? -1 : 1;
float diffF = m_lineWidth - aPict.m_lineWidth;
if (diffF < 0) return -1;
if (diffF > 0) return 1;
if (m_lineColor < aPict.m_lineColor) return -1;
if (m_lineColor > aPict.m_lineColor) return 1;
if (m_surfaceColor < aPict.m_surfaceColor) return -1;
if (m_surfaceColor > aPict.m_surfaceColor) return 1;
for (int c = 0; c < 2; c++) {
diffF = m_extend[c]-aPict.m_extend[c];
if (diffF < 0) return -1;
if (diffF > 0) return 1;
}
if (m_surfaceHasColor != aPict.m_surfaceHasColor)
return m_surfaceHasColor;
return 0;
}
protected:
virtual void getGraphicStyleProperty(WPXPropertyList &list) const = 0;
void getStyle1DProperty(WPXPropertyList &list) const;
void getStyle2DProperty(WPXPropertyList &list) const;
void startODG(MWAWPropertyHandlerEncoder &doc) const;
void endODG(MWAWPropertyHandlerEncoder &doc) const;
// - \param id=0 corresponds to linewidth
// - \param id=1 corresponds to a second extension (arrow)
void extendBDBox(float val, int id) {
assert(id>=0&& id<=1);
m_extend[id] = val;
MWAWPict::extendBDBox(m_extend[0]+m_extend[1]);
}
MWAWPictBasic() : m_lineWidth(1.0), m_lineColor(MWAWColor::black()), m_surfaceColor(MWAWColor::white()), m_surfaceHasColor(false) {
for (int c = 0; c < 2; c++) m_extend[c]=0;
setLineWidth(1.0);
}
MWAWPictBasic(MWAWPictBasic const &p) : MWAWPict(), m_lineWidth(1.0), m_lineColor(MWAWColor::black()), m_surfaceColor(MWAWColor::white()), m_surfaceHasColor(false) {
*this=p;
}
MWAWPictBasic &operator=(MWAWPictBasic const &p) {
if (&p == this) return *this;
MWAWPict::operator=(p);
m_lineWidth = p.m_lineWidth;
m_lineColor = p.m_lineColor;
m_surfaceColor = p.m_surfaceColor;
for (int c=0; c < 2; c++) m_extend[c] = p.m_extend[c];
m_surfaceHasColor = p.m_surfaceHasColor;
return *this;
}
private:
float m_lineWidth;
MWAWColor m_lineColor;
MWAWColor m_surfaceColor;
bool m_surfaceHasColor;
float m_extend[2];
};
class MWAWPictLine : public MWAWPictBasic
{
public:
MWAWPictLine(Vec2f orig, Vec2f end) : MWAWPictBasic() {
m_extremity[0] = orig;
m_extremity[1] = end;
m_arrows[0] = m_arrows[1] = false;
setBdBox(getBdBox(2,m_extremity));
}
virtual ~MWAWPictLine() {}
void setArrow(int v, bool val) {
assert(v>=0 && v<=1);
m_arrows[v]=val;
extendBDBox ((m_arrows[0] || m_arrows[1]) ? 5 : 0, 1);
}
virtual bool getODGBinary(WPXBinaryData &res) const;
protected:
virtual SubType getSubType() const {
return Line;
}
virtual void getGraphicStyleProperty(WPXPropertyList &list) const;
virtual int cmp(MWAWPict const &a) const {
int diff = MWAWPictBasic::cmp(a);
if (diff) return diff;
MWAWPictLine const &aLine = static_cast<MWAWPictLine const &>(a);
for (int c = 0; c < 2; c++) {
diff = m_extremity[c].cmpY(aLine.m_extremity[c]);
if (diff) return diff;
}
for (int c = 0; c < 2; c++) {
diff = m_arrows[c]-aLine.m_arrows[c];
if (diff) return (diff < 0) ? -1 : 1;
}
return 0;
}
Vec2f m_extremity[2];
bool m_arrows[2];
};
class MWAWPictRectangle : public MWAWPictBasic
{
public:
MWAWPictRectangle(Box2f box) : MWAWPictBasic(), m_rectBox(box) {
setBdBox(box);
for (int i = 0; i < 2; i++) m_cornerWidth[i] = 0;
}
virtual ~MWAWPictRectangle() {}
void setRoundCornerWidth(int w) {
m_cornerWidth[0] = m_cornerWidth[1] = w;
}
void setRoundCornerWidth(int xw, int yw) {
m_cornerWidth[0] = xw;
m_cornerWidth[1] = yw;
}
virtual bool getODGBinary(WPXBinaryData &res) const;
protected:
virtual SubType getSubType() const {
return Rectangle;
}
virtual void getGraphicStyleProperty(WPXPropertyList &list) const;
virtual int cmp(MWAWPict const &a) const {
int diff = MWAWPictBasic::cmp(a);
if (diff) return diff;
MWAWPictRectangle const &aRect = static_cast<MWAWPictRectangle const &>(a);
for (int i = 0; i < 2; i++) {
diff = m_cornerWidth[i] - aRect.m_cornerWidth[i];
if (diff) return (diff < 0) ? -1 : 1;
}
return 0;
}
int m_cornerWidth[2];
Box2f m_rectBox;
};
class MWAWPictCircle : public MWAWPictBasic
{
public:
MWAWPictCircle(Box2f box) : MWAWPictBasic(), m_circleBox(box) {
setBdBox(box);
}
virtual ~MWAWPictCircle() {}
virtual bool getODGBinary(WPXBinaryData &res) const;
protected:
virtual SubType getSubType() const {
return Circle;
}
virtual void getGraphicStyleProperty(WPXPropertyList &list) const;
virtual int cmp(MWAWPict const &a) const {
return MWAWPictBasic::cmp(a);
}
// corner point
Box2f m_circleBox;
};
class MWAWPictArc : public MWAWPictBasic
{
public:
MWAWPictArc(Box2f box, Box2f ellBox, float ang1, float ang2) : MWAWPictBasic(), m_circleBox(ellBox) {
setBdBox(box);
m_angle[0] = ang1;
m_angle[1] = ang2;
}
virtual ~MWAWPictArc() {}
virtual bool getODGBinary(WPXBinaryData &res) const;
protected:
virtual SubType getSubType() const {
return Arc;
}
virtual void getGraphicStyleProperty(WPXPropertyList &list) const;
virtual int cmp(MWAWPict const &a) const {
int diff = MWAWPictBasic::cmp(a);
if (diff) return diff;
MWAWPictArc const &aArc = static_cast<MWAWPictArc const &>(a);
// first check the bdbox
diff = m_circleBox.cmp(aArc.m_circleBox);
if (diff) return diff;
for (int c = 0; c < 2; c++) {
float diffF = m_angle[c]-aArc.m_angle[c];
if (diffF < 0) return -1;
if (diffF > 0) return 1;
}
return 0;
}
Box2f m_circleBox;
float m_angle[2];
};
class MWAWPictPath : public MWAWPictBasic
{
public:
MWAWPictPath(Box2f bdBox, std::string path) : MWAWPictBasic(), m_path(path) {
setBdBox(bdBox);
}
virtual ~MWAWPictPath() {}
virtual bool getODGBinary(WPXBinaryData &res) const;
protected:
virtual SubType getSubType() const {
return Path;
}
virtual void getGraphicStyleProperty(WPXPropertyList &list) const;
virtual int cmp(MWAWPict const &a) const {
int diff = MWAWPictBasic::cmp(a);
if (diff) return diff;
MWAWPictPath const &aPath = static_cast<MWAWPictPath const &>(a);
// first check the bdbox
diff = m_path.compare(aPath.m_path);
if (diff) return diff;
return 0;
}
std::string m_path;
};
class MWAWPictPolygon : public MWAWPictBasic
{
public:
MWAWPictPolygon(Box2f bdBox, std::vector<Vec2f> const &lVect) : MWAWPictBasic(), m_verticesList(lVect) {
setBdBox(bdBox);
}
virtual ~MWAWPictPolygon() {}
virtual bool getODGBinary(WPXBinaryData &res) const;
protected:
virtual SubType getSubType() const {
return Polygon;
}
virtual void getGraphicStyleProperty(WPXPropertyList &list) const;
virtual int cmp(MWAWPict const &a) const {
int diff = MWAWPictBasic::cmp(a);
if (diff) return diff;
MWAWPictPolygon const &aPoly = static_cast<MWAWPictPolygon const &>(a);
if (m_verticesList.size()<aPoly.m_verticesList.size())
return -1;
if (m_verticesList.size()>aPoly.m_verticesList.size())
return 1;
// check the vertices
for (size_t c = 0; c < m_verticesList.size(); c++) {
diff = m_verticesList[c].cmpY(aPoly.m_verticesList[c]);
if (diff) return diff;
}
return 0;
}
std::vector<Vec2f> m_verticesList;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWPictBasic::operator=
MWAWPictBasic & operator=(MWAWPictBasic const &p)
protected= must not be called directly
Definition: MWAWPictBasic.hxx:177
MWAWPictPolygon::getODGBinary
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:300
MWAWPictBasic::setSurfaceColor
void setSurfaceColor(MWAWColor const &col, bool hasColor=true)
sets the surface color.
Definition: MWAWPictBasic.hxx:96
MWAWPictBasic::Arc
Definition: MWAWPictBasic.hxx:76
MWAWPictBasic::m_extend
float m_extend[2]
m_extend[0]: from lineWidth, m_extend[1]: came from extra data
Definition: MWAWPictBasic.hxx:198
MWAWPictPath::MWAWPictPath
MWAWPictPath(Box2f bdBox, std::string path)
constructor: bdbox followed by the path definition
Definition: MWAWPictBasic.hxx:387
MWAWPictPath
a class used to define a generic path ( a bezier curve, ... )
Definition: MWAWPictBasic.hxx:383
MWAWPictArc::MWAWPictArc
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
MWAWPictRectangle::~MWAWPictRectangle
virtual ~MWAWPictRectangle()
virtual destructor
Definition: MWAWPictBasic.hxx:264
MWAWPictBasic::setLineWidth
void setLineWidth(float w)
sets the line width (by default 1.0)
Definition: MWAWPictBasic.hxx:85
MWAWPictBasic::setLineColor
void setLineColor(MWAWColor const &col)
sets the line color.
Definition: MWAWPictBasic.hxx:91
MWAWPictArc
a class used to define an arc
Definition: MWAWPictBasic.hxx:336
libmwaw_internal.hxx
Box2::cmp
int cmp(Box2< T > const &p) const
comparison function : fist sorts min by Y,X values then max extremity
Definition: libmwaw_internal.hxx:841
MWAWPictCircle::cmp
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:327
Box2< float >
MWAWPictPath::~MWAWPictPath
virtual ~MWAWPictPath()
virtual destructor
Definition: MWAWPictBasic.hxx:391
MWAWPictCircle::MWAWPictCircle
MWAWPictCircle(Box2f box)
constructor
Definition: MWAWPictBasic.hxx:310
MWAWPictRectangle::getSubType
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:282
MWAWPictCircle::getODGBinary
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:186
MWAWPictBasic::cmp
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order.
Definition: MWAWPictBasic.hxx:118
MWAWPictPolygon::getGraphicStyleProperty
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:340
MWAWPictLine::getSubType
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:226
MWAWPictPath::getODGBinary
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:262
MWAWPictBasic::hasSurfaceColor
bool hasSurfaceColor() const
Definition: MWAWPictBasic.hxx:100
MWAWPictBasic::m_lineColor
MWAWColor m_lineColor
the line color
Definition: MWAWPictBasic.hxx:192
MWAWPictBasic::Polygon
Definition: MWAWPictBasic.hxx:76
MWAWPictLine::MWAWPictLine
MWAWPictLine(Vec2f orig, Vec2f end)
constructor
Definition: MWAWPictBasic.hxx:206
MWAWPropertyHandlerEncoder
write in WPXBinaryData a list of tags/and properties
Definition: MWAWPropertyHandler.hxx:82
MWAWPictArc::m_angle
float m_angle[2]
the two angles
Definition: MWAWPictBasic.hxx:379
MWAWPictRectangle::m_rectBox
Box2f m_rectBox
corner point
Definition: MWAWPictBasic.hxx:302
MWAWPictPolygon::MWAWPictPolygon
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
MWAWPictArc::getSubType
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:354
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:161
MWAWPict::cmp
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
MWAWPictLine::getODGBinary
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:107
MWAWPictBasic::Rectangle
Definition: MWAWPictBasic.hxx:76
MWAWPictPolygon
a class used to define a polygon
Definition: MWAWPictBasic.hxx:419
MWAWPictPolygon::getSubType
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:435
MWAWPictPath::getGraphicStyleProperty
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:287
MWAWPictRectangle::cmp
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:288
MWAWPictLine::~MWAWPictLine
virtual ~MWAWPictLine()
virtual destructor
Definition: MWAWPictBasic.hxx:213
MWAWPictBasic::SubType
SubType
the picture subtype ( line, rectangle, polygon, circle, arc)
Definition: MWAWPictBasic.hxx:76
MWAWPictPath::cmp
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:404
MWAWPictBasic::getStyle2DProperty
void getStyle2DProperty(WPXPropertyList &list) const
returns the basic style property for 2D form (line, ...)
Definition: MWAWPictBasic.cxx:91
MWAWPictRectangle::setRoundCornerWidth
void setRoundCornerWidth(int w)
sets the corner width
Definition: MWAWPictBasic.hxx:267
MWAWPictBasic::getSubType
virtual SubType getSubType() const =0
returns the picture subtype
MWAWPictBasic::getODGBinary
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
MWAWPictBasic::Line
Definition: MWAWPictBasic.hxx:76
MWAWPict.hxx
MWAWPictCircle::getSubType
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:321
MWAWPictLine::m_arrows
bool m_arrows[2]
two bool to indicated if extremity has arrow or not
Definition: MWAWPictBasic.hxx:251
MWAWPictRectangle::m_cornerWidth
int m_cornerWidth[2]
an int used to define round corner
Definition: MWAWPictBasic.hxx:300
MWAWPictBasic::MWAWPictBasic
MWAWPictBasic()
protected constructor must not be called directly
Definition: MWAWPictBasic.hxx:168
MWAWPictBasic::Path
Definition: MWAWPictBasic.hxx:76
MWAWPictPolygon::m_verticesList
std::vector< Vec2f > m_verticesList
the vertices list
Definition: MWAWPictBasic.hxx:459
MWAWPict::Basic
Definition: MWAWPict.hxx:67
MWAWPictArc::~MWAWPictArc
virtual ~MWAWPictArc()
virtual destructor
Definition: MWAWPictBasic.hxx:347
MWAWPictCircle::~MWAWPictCircle
virtual ~MWAWPictCircle()
virtual destructor
Definition: MWAWPictBasic.hxx:314
MWAWPictBasic::Circle
Definition: MWAWPictBasic.hxx:76
MWAWPictRectangle::getODGBinary
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:149
MWAWPict::setBdBox
void setBdBox(Box2f const &box)
sets the bdbox of the picture
Definition: MWAWPict.hxx:87
MWAWPict::Type
Type
the different picture types:
Definition: MWAWPict.hxx:67
MWAWPictCircle::getGraphicStyleProperty
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:209
MWAWPictBasic::getGraphicStyleProperty
virtual void getGraphicStyleProperty(WPXPropertyList &list) const =0
function to implement in subclass in order to get the graphics style
MWAWPictBasic::extendBDBox
void extendBDBox(float val, int id)
a function to extend the bdbox
Definition: MWAWPictBasic.hxx:161
Vec2::cmpY
int cmpY(Vec2< T > const &p) const
a comparison function: which first compares y then x
Definition: libmwaw_internal.hxx:528
MWAWPictCircle
a class used to define a circle or an ellipse
Definition: MWAWPictBasic.hxx:306
MWAWPictRectangle::getGraphicStyleProperty
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:176
MWAWPictArc::cmp
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:360
MWAWPictBasic::endODG
void endODG(MWAWPropertyHandlerEncoder &doc) const
adds the odg footer
Definition: MWAWPictBasic.cxx:74
MWAWPictBasic::getStyle1DProperty
void getStyle1DProperty(WPXPropertyList &list) const
returns the basic style property for 1D form (line, ...)
Definition: MWAWPictBasic.cxx:78
MWAWPictBasic::getType
virtual Type getType() const
returns the picture type
Definition: MWAWPictBasic.hxx:78
MWAWPictBasic::startODG
void startODG(MWAWPropertyHandlerEncoder &doc) const
adds the odg header knowing the minPt and the maxPt
Definition: MWAWPictBasic.cxx:59
MWAWPictBasic::~MWAWPictBasic
virtual ~MWAWPictBasic()
virtual destructor
Definition: MWAWPictBasic.hxx:73
MWAWPictLine::cmp
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:232
MWAWPictArc::getODGBinary
virtual bool getODGBinary(WPXBinaryData &res) const
returns a ODG (encoded)
Definition: MWAWPictBasic.cxx:219
MWAWPictArc::m_circleBox
Box2f m_circleBox
corner ellipse rectangle point
Definition: MWAWPictBasic.hxx:376
MWAWPictLine::getGraphicStyleProperty
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:130
MWAWPictBasic::MWAWPictBasic
MWAWPictBasic(MWAWPictBasic const &p)
protected constructor must not be called directly
Definition: MWAWPictBasic.hxx:173
MWAWPictPath::m_path
std::string m_path
the string represented the path (in svg)
Definition: MWAWPictBasic.hxx:415
MWAWPictPath::getSubType
virtual SubType getSubType() const
returns the class type
Definition: MWAWPictBasic.hxx:398
MWAWPictCircle::m_circleBox
Box2f m_circleBox
Definition: MWAWPictBasic.hxx:332
MWAWPictPolygon::~MWAWPictPolygon
virtual ~MWAWPictPolygon()
virtual destructor
Definition: MWAWPictBasic.hxx:428
MWAWPictLine
a class to store a simple line
Definition: MWAWPictBasic.hxx:202
MWAWPict::getBdBox
Box2f getBdBox() const
returns the bdbox of the picture
Definition: MWAWPict.hxx:80
MWAWPictBasic::m_surfaceColor
MWAWColor m_surfaceColor
the line color
Definition: MWAWPictBasic.hxx:194
MWAWPictBasic::getBinary
virtual bool getBinary(WPXBinaryData &data, std::string &s) const
returns the final representation in encoded odg (if possible)
Definition: MWAWPictBasic.hxx:105
MWAWPictBasic::m_surfaceHasColor
bool m_surfaceHasColor
true if the surface has some color
Definition: MWAWPictBasic.hxx:196
MWAWPictRectangle::MWAWPictRectangle
MWAWPictRectangle(Box2f box)
constructor
Definition: MWAWPictBasic.hxx:259
Vec2< float >
MWAWPictLine::m_extremity
Vec2f m_extremity[2]
the extremity coordinate
Definition: MWAWPictBasic.hxx:249
MWAWPictBasic
an abstract class which defines basic picture (a line, a rectangle, ...)
Definition: MWAWPictBasic.hxx:69
MWAWPictRectangle::setRoundCornerWidth
void setRoundCornerWidth(int xw, int yw)
sets the corner width
Definition: MWAWPictBasic.hxx:272
MWAWPictPolygon::cmp
virtual int cmp(MWAWPict const &a) const
comparison function
Definition: MWAWPictBasic.hxx:441
MWAWPictArc::getGraphicStyleProperty
virtual void getGraphicStyleProperty(WPXPropertyList &list) const
returns the graphics style
Definition: MWAWPictBasic.cxx:249
MWAWPict::extendBDBox
void extendBDBox(float val)
udaptes the bdbox, by extended it by (val-previousVal)
Definition: MWAWPict.hxx:136
MWAWPictRectangle
a class to define a rectangle (or a rectangle with round corner)
Definition: MWAWPictBasic.hxx:255
MWAWPictBasic::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWPictBasic.hxx:190
MWAWPictLine::setArrow
void setArrow(int v, bool val)
sets the arrow: orig(v=0), end(v=1)
Definition: MWAWPictBasic.hxx:215
MWAWPict
Generic function used to define/store a picture.
Definition: MWAWPict.hxx:53
MWAWPict::operator=
MWAWPict & operator=(MWAWPict const &p)
protected operator= must not be called directly
Definition: MWAWPict.hxx:147