Go to the documentation of this file.
33 #ifndef MWAW_GRAPHIC_SHAPE
34 # define MWAW_GRAPHIC_SHAPE
39 # include "librevenge/librevenge.h"
68 bool get(librevenge::RVNGPropertyList &pList,
MWAWVec2f const &orig)
const;
181 bool addPathTo(
MWAWVec2f const &orig, librevenge::RVNGPropertyListVector &propList)
const;
188 std::vector<PathData>
getPath(
bool forTransformation)
const;
bool isEmpty() const
returns true if there is no arrow
Definition: MWAWGraphicStyle.hxx:116
void translate(MWAWVec2f const &delta)
translate all the coordinate by delta
Definition: MWAWGraphicShape.cxx:94
MWAWGraphicShape transform(MWAWTransformation const &matrix) const
returns a new shape corresponding to a matrix transformation
Definition: MWAWGraphicShape.cxx:400
int cmp(MWAWGraphicShape const &a) const
compare two shapes
Definition: MWAWGraphicShape.cxx:309
MWAWBox2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:172
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
PathData(char type, MWAWVec2f const &x=MWAWVec2f(), MWAWVec2f const &x1=MWAWVec2f(), MWAWVec2f const &x2=MWAWVec2f())
constructor
Definition: MWAWGraphicShape.hxx:55
@ C_Polygon
Definition: MWAWGraphicShape.hxx:51
void scale(MWAWVec2f const &factor)
scale all the coordinate by a factor
Definition: MWAWGraphicShape.cxx:107
@ C_Path
Definition: MWAWGraphicShape.hxx:51
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:130
void translate(MWAWVec2f const &delta)
translate all the coordinate by delta
Definition: MWAWGraphicShape.cxx:351
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:203
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:227
void extend(T val)
extends the bdbox by (val, val) keeping the center
Definition: libmwaw_internal.hxx:1063
void rotate(float angle, MWAWVec2f const &delta)
rotate all the coordinate by angle (origin rotation) then translate coordinate
Definition: MWAWGraphicShape.cxx:120
MWAWVec2f m_r
the radius ( A command)
Definition: MWAWGraphicShape.hxx:82
~MWAWGraphicShape()
destructor
Definition: MWAWGraphicShape.cxx:223
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWBox2f m_bdBox
the shape bdbox
Definition: MWAWGraphicShape.hxx:193
bool hasLine() const
returns true if the border is defined
Definition: MWAWGraphicStyle.hxx:277
static MWAWGraphicShape measure(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a measure
Definition: MWAWGraphicShape.cxx:245
friend std::ostream & operator<<(std::ostream &o, MWAWGraphicShape const &sh)
a print operator
Definition: MWAWGraphicShape.cxx:252
bool m_largeAngle
large angle ( A command)
Definition: MWAWGraphicShape.hxx:86
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:112
bool m_sweep
sweep value ( A command)
Definition: MWAWGraphicShape.hxx:88
Type getType() const
returns the type corresponding to a shape
Definition: MWAWGraphicShape.hxx:167
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:140
@ Polygon
Definition: MWAWGraphicShape.hxx:49
MWAWBox2< T > getUnion(MWAWBox2< T > const &box) const
returns the union between this and box
Definition: libmwaw_internal.hxx:1070
int cmp(PathData const &a) const
comparison function
Definition: MWAWGraphicShape.cxx:199
@ Rectangle
Definition: MWAWGraphicShape.hxx:49
int cmp(MWAWVec2< T > const &p) const
a comparison function: which first compares x then y
Definition: libmwaw_internal.hxx:720
float m_rotate
the rotate ( A command)
Definition: MWAWGraphicShape.hxx:84
T y() const
second element
Definition: libmwaw_internal.hxx:620
bool addPathTo(MWAWVec2f const &orig, librevenge::RVNGPropertyListVector &propList) const
adds the shape path to a propListVector
Definition: MWAWGraphicShape.cxx:430
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:375
@ C_Bad
Definition: MWAWGraphicShape.hxx:51
T x() const
first element
Definition: libmwaw_internal.hxx:615
char m_type
the type: M, L, ...
Definition: MWAWGraphicShape.hxx:74
void transform(MWAWTransformation const &matrix, float rotation)
multiply all the coordinate by a matrix
Definition: MWAWGraphicShape.cxx:141
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:201
#define M_PI
Definition: libmwaw_internal.hxx:49
@ Path
Definition: MWAWGraphicShape.hxx:49
Type m_type
the type
Definition: MWAWGraphicShape.hxx:191
friend std::ostream & operator<<(std::ostream &o, PathData const &path)
a print operator
Definition: MWAWGraphicShape.cxx:59
MWAWGraphicShape rotate(float angle, MWAWVec2f const ¢er) const
return a new shape corresponding to a rotation from center.
Definition: MWAWGraphicShape.cxx:377
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:430
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1134
@ C_Polyline
Definition: MWAWGraphicShape.hxx:51
@ Pie
Definition: MWAWGraphicShape.hxx:49
bool get(librevenge::RVNGPropertyList &pList, MWAWVec2f const &orig) const
update the property list to correspond to a command
Definition: MWAWGraphicShape.cxx:158
MWAWVec2f m_cornerWidth
the rectangle round corner
Definition: MWAWGraphicShape.hxx:197
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:120
Command
an enum used to define the interface command
Definition: MWAWGraphicShape.hxx:51
MWAWVec2f m_x1
x1 value
Definition: MWAWGraphicShape.hxx:78
@ Line
Definition: MWAWGraphicShape.hxx:49
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1013
@ ShapeUnknown
Definition: MWAWGraphicShape.hxx:49
MWAWVec2f m_x
the main x value
Definition: MWAWGraphicShape.hxx:76
@ C_Ellipse
Definition: MWAWGraphicShape.hxx:51
MWAWVec2f m_x2
x2 value
Definition: MWAWGraphicShape.hxx:80
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:148
MWAWGraphicShape()
constructor
Definition: MWAWGraphicShape.hxx:92
MWAWVec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:980
@ Measure
Definition: MWAWGraphicShape.hxx:49
std::ostream & operator<<(std::ostream &o, MWAWGraphicShape::PathData const &path)
Definition: MWAWGraphicShape.cxx:59
Command addTo(MWAWVec2f const &orig, bool asSurface, librevenge::RVNGPropertyList &propList) const
updates the propList to send to an interface
Definition: MWAWGraphicShape.cxx:454
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
@ Arc
Definition: MWAWGraphicShape.hxx:49
Type
an enum used to define the shape type
Definition: MWAWGraphicShape.hxx:49
std::vector< PathData > getPath(bool forTransformation) const
return a path corresponding to the shape
Definition: MWAWGraphicShape.cxx:592
void scale(MWAWVec2f const &factor)
rescale all the coordinate
Definition: MWAWGraphicShape.cxx:363
MWAWVec2f m_arcAngles
the start and end value which defines an arc
Definition: MWAWGraphicShape.hxx:199
@ Circle
Definition: MWAWGraphicShape.hxx:49
MWAWVec2< T > const & max() const
the maximum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:985
a simple path component
Definition: MWAWGraphicShape.hxx:53
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:103
@ C_Rectangle
Definition: MWAWGraphicShape.hxx:51
std::string m_extra
extra data
Definition: MWAWGraphicShape.hxx:205
MWAWBox2f m_formBox
the internal shape bdbox ( used for arc, circle to store the circle bdbox )
Definition: MWAWGraphicShape.hxx:195
Generated on Wed Jun 17 2020 06:30:12 for libmwaw by
doxygen 1.8.18