10 #ifndef __LIBPAGEMAKER_OUTPUTSHAPE_H__
11 #define __LIBPAGEMAKER_OUTPUTSHAPE_H__
15 #include <boost/shared_ptr.hpp>
39 : m_isClosed(isClosed), m_shapeType(shape), m_points(), m_rotation(rotation), m_skew(skew),
40 m_bboxLeft(), m_bboxTop(), m_bboxRight(), m_bboxBot(), m_fillProps(fillProps), m_strokeProps(strokeProps), m_text(), m_charProps(), m_paraProps(), m_bitmap(), m_width(), m_height()
43 OutputShape(
bool isClosed,
int shape,
double rotation,
double skew, std::string text, std::vector<PMDCharProperties> charProps, std::vector<PMDParaProperties> paraProps)
44 : m_isClosed(isClosed), m_shapeType(shape), m_points(), m_rotation(rotation), m_skew(skew),
45 m_bboxLeft(), m_bboxTop(), m_bboxRight(), m_bboxBot(),
48 m_text(text), m_charProps(charProps), m_paraProps(paraProps), m_bitmap(), m_width(), m_height()
51 OutputShape(
bool isClosed,
int shape,
double rotation,
double skew, librevenge::RVNGBinaryData bitmap)
52 : m_isClosed(isClosed), m_shapeType(shape), m_points(), m_rotation(rotation), m_skew(skew),
53 m_bboxLeft(), m_bboxTop(), m_bboxRight(), m_bboxBot(),
56 m_text(), m_charProps(), m_paraProps(), m_bitmap(bitmap), m_width(), m_height()
61 return m_points.size();
66 return (m_points.size() > i) ? m_points[i] :
InchPoint(0, 0);
121 if (m_points.empty() && m_bitmap.empty())
125 return std::make_pair(
InchPoint(m_bboxLeft, m_bboxTop),
InchPoint(m_bboxRight, m_bboxBot));
130 m_bboxLeft = bboxTopLeft.
m_x;
131 m_bboxTop = bboxTopLeft.
m_y;
132 m_bboxRight = bboxBotRight.
m_x;
133 m_bboxBot = bboxBotRight.
m_y;
160 const boost::shared_ptr<const PMDLineSet> &lineSet,
const InchPoint &translate);
boost::shared_ptr< OutputShape > newOutputShape(const boost::shared_ptr< const PMDLineSet > &lineSet, const InchPoint &translate)
Definition: OutputShape.cpp:14
std::string m_text
Definition: OutputShape.h:31
double m_bboxBot
Definition: OutputShape.h:28
PMDFillProperties m_fillProps
Definition: OutputShape.h:29
InchPoint getPoint(unsigned i) const
Definition: OutputShape.h:64
OutputShape(bool isClosed, int shape, double rotation, double skew, const PMDFillProperties &fillProps, const PMDStrokeProperties &strokeProps)
Definition: OutputShape.h:38
double getWidth() const
Definition: OutputShape.h:147
double m_height
Definition: OutputShape.h:35
const PMDStrokeProperties & getStrokeProperties() const
Definition: OutputShape.h:84
std::vector< PMDCharProperties > getCharProperties() const
Definition: OutputShape.h:104
uint8_t shapeType() const
Definition: OutputShape.h:74
Definition: geometry.h:22
bool m_isClosed
Definition: OutputShape.h:23
bool getIsClosed() const
Definition: OutputShape.h:69
const PMDFillProperties & getFillProperties() const
Definition: OutputShape.h:79
double m_rotation
Definition: OutputShape.h:26
void addPoint(InchPoint point)
Definition: OutputShape.h:136
uint8_t m_shapeType
Definition: OutputShape.h:24
double getSkew() const
Definition: OutputShape.h:94
unsigned numPoints() const
Definition: OutputShape.h:59
Unit m_x
Definition: geometry.h:24
std::vector< InchPoint > m_points
Definition: OutputShape.h:25
std::string getText() const
Definition: OutputShape.h:99
Unit m_y
Definition: geometry.h:25
OutputShape(bool isClosed, int shape, double rotation, double skew, librevenge::RVNGBinaryData bitmap)
Definition: OutputShape.h:51
OutputShape(bool isClosed, int shape, double rotation, double skew, std::string text, std::vector< PMDCharProperties > charProps, std::vector< PMDParaProperties > paraProps)
Definition: OutputShape.h:43
std::pair< InchPoint, InchPoint > getBoundingBox() const
Definition: OutputShape.h:119
void setBoundingBox(InchPoint bboxTopLeft, InchPoint bboxBotRight)
Definition: OutputShape.h:128
double m_width
Definition: OutputShape.h:35
Definition: OutputShape.h:21
Point< double > InchPoint
Definition: geometry.h:32
double m_bboxTop
Definition: OutputShape.h:28
Definition: PMDExceptions.h:53
void setDimensions(double width, double height)
Definition: OutputShape.h:141
librevenge::RVNGBinaryData m_bitmap
Definition: OutputShape.h:34
Definition: PMDTypes.h:40
Definition: PMDTypes.h:52
std::vector< PMDParaProperties > m_paraProps
Definition: OutputShape.h:33
std::vector< PMDCharProperties > m_charProps
Definition: OutputShape.h:32
librevenge::RVNGBinaryData getBitmap() const
Definition: OutputShape.h:114
Definition: geometry.h:20
double m_bboxLeft
Definition: OutputShape.h:28
double getHeight() const
Definition: OutputShape.h:152
PMDStrokeProperties m_strokeProps
Definition: OutputShape.h:30
std::vector< PMDParaProperties > getParaProperties() const
Definition: OutputShape.h:109
double m_bboxRight
Definition: OutputShape.h:28
double getRotation() const
Definition: OutputShape.h:89
double m_skew
Definition: OutputShape.h:27