33 #ifndef MWAW_GRAPHIC_SHAPE
34 # define MWAW_GRAPHIC_SHAPE
39 # include "librevenge/librevenge.h"
66 bool get(librevenge::RVNGPropertyList &pList,
Vec2f const &orig)
const;
173 Command addTo(
Vec2f const &orig,
bool asSurface, librevenge::RVNGPropertyList &propList)
const;
180 std::vector<PathData>
getPath()
const;
static MWAWGraphicShape circle(Box2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:108
Vec2f m_r
the radius ( A command)
Definition: MWAWGraphicShape.hxx:80
std::vector< PathData > getPath() const
return a path corresponding to the shape
Definition: MWAWGraphicShape.cxx:491
MWAWGraphicShape()
constructor
Definition: MWAWGraphicShape.hxx:90
Vec2f m_cornerWidth
the rectangle round corner
Definition: MWAWGraphicShape.hxx:189
Definition: MWAWGraphicShape.hxx:49
void translate(Vec2f const &delta)
translate all the coordinate by delta
Definition: MWAWGraphicShape.cxx:310
Vec2< float > Vec2f
Vec2 of float.
Definition: libmwaw_internal.hxx:660
Box2f m_formBox
the internal shape bdbox ( used for arc, circle to store the circle bdbox )
Definition: MWAWGraphicShape.hxx:187
Definition: MWAWGraphicShape.hxx:51
MWAWGraphicShape rotate(float angle, Vec2f const ¢er) const
return a new shape corresponding to a rotation from center.
Definition: MWAWGraphicShape.cxx:335
Definition: MWAWGraphicShape.hxx:49
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
Command
an enum used to define the interface command
Definition: MWAWGraphicShape.hxx:51
Definition: MWAWGraphicShape.hxx:49
int cmp(MWAWGraphicShape const &a) const
compare two shapes
Definition: MWAWGraphicShape.cxx:268
Definition: MWAWGraphicShape.hxx:51
Box2f m_bdBox
the shape bdbox
Definition: MWAWGraphicShape.hxx:185
Vec2f m_arcAngles
the start and end value which defines an arc
Definition: MWAWGraphicShape.hxx:191
bool m_sweep
sweep value ( A command)
Definition: MWAWGraphicShape.hxx:86
void rotate(float angle, Vec2f const &delta)
rotate all the coordinate by angle (origin rotation) then translate coordinate
Definition: MWAWGraphicShape.cxx:116
bool m_largeAngle
large angle ( A command)
Definition: MWAWGraphicShape.hxx:84
Type
an enum used to define the shape type
Definition: MWAWGraphicShape.hxx:49
Vec2f m_x
the main x value
Definition: MWAWGraphicShape.hxx:74
static MWAWGraphicShape pie(Box2f const &box, Box2f const &circleBox, Vec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:126
Definition: MWAWGraphicShape.hxx:49
static MWAWGraphicShape path(Box2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:144
float m_rotate
the rotate ( A command)
Definition: MWAWGraphicShape.hxx:82
Definition: MWAWGraphicShape.hxx:49
PathData(char type, Vec2f const &x=Vec2f(), Vec2f const &x1=Vec2f(), Vec2f const &x2=Vec2f())
constructor
Definition: MWAWGraphicShape.hxx:55
char m_type
the type: M, L, ...
Definition: MWAWGraphicShape.hxx:72
Command addTo(Vec2f const &orig, bool asSurface, librevenge::RVNGPropertyList &propList) const
updates the propList to send to an interface
Definition: MWAWGraphicShape.cxx:358
Definition: MWAWGraphicShape.hxx:51
void scale(Vec2f const &factor)
rescale all the coordinate
Definition: MWAWGraphicShape.cxx:322
int cmp(PathData const &a) const
comparison function
Definition: MWAWGraphicShape.cxx:178
friend std::ostream & operator<<(std::ostream &o, PathData const &path)
a print operator
Definition: MWAWGraphicShape.cxx:57
std::string m_extra
extra data
Definition: MWAWGraphicShape.hxx:197
virtual ~MWAWGraphicShape()
virtual destructor
Definition: MWAWGraphicShape.hxx:95
Box2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:166
Definition: MWAWGraphicShape.hxx:51
Definition: MWAWGraphicShape.hxx:51
Definition: MWAWGraphicShape.hxx:49
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:45
static MWAWGraphicShape arc(Box2f const &box, Box2f const &circleBox, Vec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:116
std::vector< Vec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:193
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:195
Definition: MWAWGraphicShape.hxx:49
static MWAWGraphicShape line(Vec2f const &orign, Vec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:202
Definition: MWAWGraphicShape.hxx:51
friend std::ostream & operator<<(std::ostream &o, MWAWGraphicShape const &sh)
a print operator
Definition: MWAWGraphicShape.cxx:220
Vec2f m_x1
x1 value
Definition: MWAWGraphicShape.hxx:76
void scale(Vec2f const &factor)
scale all the coordinate by a factor
Definition: MWAWGraphicShape.cxx:103
a simple path component
Definition: MWAWGraphicShape.hxx:53
static MWAWGraphicShape rectangle(Box2f const &box, Vec2f const &corners=Vec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:99
Type m_type
the type
Definition: MWAWGraphicShape.hxx:183
Type getType() const
returns the type corresponding to a shape
Definition: MWAWGraphicShape.hxx:161
void translate(Vec2f const &delta)
translate all the coordinate by delta
Definition: MWAWGraphicShape.cxx:90
Definition: MWAWGraphicShape.hxx:49
Vec2f m_x2
x2 value
Definition: MWAWGraphicShape.hxx:78
static MWAWGraphicShape polygon(Box2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:136