a structure used to define a picture shape More...
#include <MWAWGraphicShape.hxx>
Classes | |
struct | PathData |
a simple path component More... | |
Public Types | |
enum | Type { Arc, Circle, Line, Rectangle, Path, Pie, Polygon, ShapeUnknown } |
an enum used to define the shape type More... | |
Public Member Functions | |
MWAWGraphicShape () | |
constructor More... | |
virtual | ~MWAWGraphicShape () |
virtual destructor More... | |
void | translate (Vec2f const &delta) |
translate all the coordinate by delta More... | |
MWAWGraphicShape | rotate (float angle, Vec2f const ¢er) const |
return a new shape corresponding to a rotation from center. More... | |
Box2f | getBdBox (MWAWGraphicStyle const &style, bool moveToO=false) const |
returns the bdbox corresponding to a style More... | |
bool | send (MWAWGraphicInterface &interface, MWAWGraphicStyle const &style, Vec2f const &orig) const |
add shape to a graphic listener More... | |
int | cmp (MWAWGraphicShape const &a) const |
compare two shapes More... | |
Static Public Member Functions | |
static MWAWGraphicShape | line (Vec2f const &orign, Vec2f const &dest) |
static constructor to create a line More... | |
static MWAWGraphicShape | rectangle (Box2f const &box, Vec2f const &corners=Vec2f(0, 0)) |
static constructor to create a rectangle More... | |
static MWAWGraphicShape | circle (Box2f const &box) |
static constructor to create a circle More... | |
static MWAWGraphicShape | arc (Box2f const &box, Box2f const &circleBox, Vec2f const &angles) |
static constructor to create a arc More... | |
static MWAWGraphicShape | pie (Box2f const &box, Box2f const &circleBox, Vec2f const &angles) |
static constructor to create a pie More... | |
static MWAWGraphicShape | polygon (Box2f const &box) |
static constructor to create a polygon More... | |
static MWAWGraphicShape | path (Box2f const &box) |
static constructor to create a path More... | |
Public Attributes | |
Type | m_type |
the type More... | |
Box2f | m_bdBox |
the shape bdbox More... | |
Box2f | m_formBox |
the internal shape bdbox ( used for arc, circle to store the circle bdbox ) More... | |
Vec2f | m_cornerWidth |
the rectangle round corner More... | |
Vec2f | m_arcAngles |
the start and end value which defines an arc More... | |
std::vector< Vec2f > | m_vertices |
the list of vertices for lines or polygons More... | |
std::vector< PathData > | m_path |
the list of path component More... | |
std::string | m_extra |
extra data More... | |
Protected Member Functions | |
std::vector< PathData > | getPath () const |
return a path corresponding to the shape More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, MWAWGraphicShape const &sh) |
a print operator More... | |
a structure used to define a picture shape
|
inline |
constructor
|
inlinevirtual |
virtual destructor
|
inlinestatic |
static constructor to create a arc
Referenced by MSKGraph::getEntryPicture(), and GWGraph::readFrameHeader().
|
inlinestatic |
static constructor to create a circle
int MWAWGraphicShape::cmp | ( | MWAWGraphicShape const & | a | ) | const |
compare two shapes
Box2f MWAWGraphicShape::getBdBox | ( | MWAWGraphicStyle const & | style, |
bool | moveToO = false |
||
) | const |
returns the bdbox corresponding to a style
Referenced by MWAWContentListener::insertPicture().
|
protected |
return a path corresponding to the shape
Referenced by rotate().
|
static |
static constructor to create a line
Referenced by MSKGraph::getEntryPicture(), GWGraph::readFrameHeader(), CWGraph::readShape(), HMWKGraph::sendEmptyPicture(), HMWJGraph::sendEmptyPicture(), MWAWTable::sendExtraLines(), and MRWGraph::sendRule().
|
inlinestatic |
static constructor to create a path
Referenced by MSKGraph::getEntryPicture(), GWGraph::readFrameHeader(), and rotate().
|
inlinestatic |
static constructor to create a pie
Referenced by CWGraph::readShape().
|
inlinestatic |
static constructor to create a polygon
Referenced by MSKGraph::getEntryPicture(), and GWGraph::readFrameHeader().
|
inlinestatic |
static constructor to create a rectangle
Referenced by GWGraph::readFrameHeader(), HMWKGraph::sendEmptyPicture(), HMWJGraph::sendEmptyPicture(), and MRWGraph::sendRule().
MWAWGraphicShape MWAWGraphicShape::rotate | ( | float | angle, |
Vec2f const & | center | ||
) | const |
return a new shape corresponding to a rotation from center.
Referenced by CWGraph::readShape().
bool MWAWGraphicShape::send | ( | MWAWGraphicInterface & | interface, |
MWAWGraphicStyle const & | style, | ||
Vec2f const & | orig | ||
) | const |
add shape to a graphic listener
Referenced by MWAWGraphicListener::insertPicture().
void MWAWGraphicShape::translate | ( | Vec2f const & | delta | ) |
translate all the coordinate by delta
Referenced by CWGraph::readShape().
|
friend |
a print operator
Vec2f MWAWGraphicShape::m_arcAngles |
the start and end value which defines an arc
Referenced by arc(), cmp(), getPath(), operator<<(), pie(), HMWJGraph::readShapeGraph(), HMWKGraph::readShapeGraph(), and send().
Box2f MWAWGraphicShape::m_bdBox |
the shape bdbox
Referenced by arc(), circle(), cmp(), getBdBox(), MSKGraph::getEntryPicture(), line(), operator<<(), path(), pie(), polygon(), GWGraph::readFrameHeader(), CWGraph::readShape(), HMWJGraph::readShapeGraph(), HMWKGraph::readShapeGraph(), rectangle(), rotate(), send(), MRWGraph::sendRule(), and translate().
Vec2f MWAWGraphicShape::m_cornerWidth |
the rectangle round corner
Referenced by cmp(), MSKGraph::getEntryPicture(), getPath(), operator<<(), GWGraph::readFrameHeader(), CWGraph::readShape(), HMWJGraph::readShapeGraph(), HMWKGraph::readShapeGraph(), rectangle(), and send().
std::string MWAWGraphicShape::m_extra |
extra data
Referenced by operator<<(), and CWGraph::readShape().
Box2f MWAWGraphicShape::m_formBox |
the internal shape bdbox ( used for arc, circle to store the circle bdbox )
Referenced by arc(), circle(), cmp(), MSKGraph::getEntryPicture(), getPath(), operator<<(), pie(), GWGraph::readFrameHeader(), CWGraph::readShape(), HMWJGraph::readShapeGraph(), HMWKGraph::readShapeGraph(), rectangle(), send(), and translate().
std::vector<PathData> MWAWGraphicShape::m_path |
the list of path component
Referenced by cmp(), MSKGraph::getEntryPicture(), getPath(), operator<<(), GWGraph::readFrameExtraData(), CWGraph::readPolygonData(), rotate(), send(), and translate().
Type MWAWGraphicShape::m_type |
the type
Referenced by arc(), circle(), MWAWGraphicShape::PathData::cmp(), cmp(), MWAWGraphicShape::PathData::get(), getBdBox(), MSKGraph::getEntryPicture(), CWGraphInternal::ZoneShape::getNumData(), getPath(), HMWKGraphInternal::ShapeGraph::getStyle(), line(), MSKGraphInternal::BasicShape::needExtraBorderWidth(), operator<<(), path(), pie(), polygon(), GWGraph::readFrameExtraData(), GWGraph::readFrameHeader(), HMWJGraph::readGraphData(), CWGraph::readPolygonData(), CWGraph::readShape(), HMWJGraph::readShapeGraph(), HMWKGraph::readShapeGraph(), rectangle(), MWAWGraphicShape::PathData::rotate(), send(), CWGraph::sendGroup(), HMWJGraph::sendGroup(), HMWJGraph::sendGroupChild(), CWGraph::sendShape(), HMWJGraph::sendShapeGraph(), and GWGraphInternal::FrameShape::updateStyle().
std::vector<Vec2f> MWAWGraphicShape::m_vertices |
the list of vertices for lines or polygons
Referenced by cmp(), MSKGraph::getEntryPicture(), getPath(), line(), operator<<(), GWGraph::readFrameExtraData(), HMWJGraph::readGraphData(), CWGraph::readPolygonData(), HMWJGraph::readShapeGraph(), HMWKGraph::readShapeGraph(), send(), and translate().