62 MultiPointPick = 0x00000001,
65 Rectangle = 0x00000008,
76 MoveLock = 0x00010000,
77 RotateLock = 0x00020000,
78 ResizeLock = 0x00040000,
83 TypeMask = 0x0000FFFF,
88 explicit Shape(
unsigned int type,
unsigned int flags,
const QPolygonF &basePoints,
const QTransform &transform = QTransform());
89 explicit Shape(
unsigned int type,
unsigned int flags,
const QPolygonF &basePoints,
int index,
const QTransform &transform = QTransform());
90 explicit Shape(
unsigned int type,
unsigned int flags,
const QPolygonF &basePoints,
int index,
const QString &name,
const QTransform &transform = QTransform());
91 explicit Shape(
unsigned int type,
unsigned int flags,
const QPolygonF &basePoints,
const QString &name,
const QTransform &transform = QTransform());
98 Shape normalized()
const;
100 bool isValid()
const;
102 unsigned int flags()
const;
103 void setFlags(
const unsigned int &flags);
105 bool unclosed()
const;
106 void setUnclosed(
bool unclosed);
109 void setIndex(
const int &index);
111 QString name()
const;
112 void setName(
const QString &name);
114 unsigned int type()
const;
115 void setType(
const unsigned int &type);
117 QColor color()
const;
118 void setColor(
const QColor &color);
120 QTransform transform()
const;
121 QTransform &rtransform()
const;
122 void setTransform(
const QTransform &trafo);
124 double rotationAngleDeg()
const;
125 double rotationAngleRad()
const;
127 void setRotationAngleDeg(
double degree);
128 void setRotationAngleRad(
double radians);
130 void rotateByCenterDeg(
double degree);
131 void rotateByCenterRad(
double radians);
133 void translate(
const QPointF &delta);
135 ito::float64 userData1()
const;
136 void setUserData1(
const ito::float64 &userData1);
138 ito::float64 userData2()
const;
139 void setUserData2(
const ito::float64 &userData2);
141 QPolygonF basePoints()
const;
142 QPolygonF &rbasePoints();
143 const QPolygonF &rbasePoints()
const;
144 QPolygonF contour(
bool applyTrafo =
true, qreal tol = -1.0)
const;
145 QRegion region()
const;
148 void point1MoveTo(
const QPointF &newPoint1);
150 QPointF centerPoint()
const;
151 QPointF baseCenterPoint()
const;
154 double circumference()
const;
155 double distance(
const Shape &otherShape)
const;
156 double centerDistance(
const Shape &otherShape)
const;
158 double radius()
const;
159 double radiusX()
const;
160 double radiusY()
const;
162 bool contains(
const QPointF &point)
const;
163 QVector<bool> contains(
const QPolygonF &points)
const;
165 static Shape fromRectangle(
const QRectF &rect,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
166 static Shape fromRectangle(qreal x1, qreal y1, qreal x2, qreal y2,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
167 static Shape fromSquare(
const QPointF ¢er, qreal sideLength,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
168 static Shape fromEllipse(
const QRectF &rect,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
169 static Shape fromEllipse(qreal x1, qreal y1, qreal x2, qreal y2,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
170 static Shape fromCircle(
const QPointF ¢er, qreal radius,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
171 static Shape fromLine(
const QPointF &p1,
const QPointF &p2,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
172 static Shape fromLine(qreal x1, qreal y1, qreal x2, qreal y2,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
173 static Shape fromPoint(
const QPointF &point,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
174 static Shape fromPoint(qreal x, qreal y,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
175 static Shape fromPolygon(
const QPolygonF &polygon,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
176 static Shape fromMultipoint(
const QPolygonF &polygon,
int index = -1, QString name =
"",
const QTransform &trafo = QTransform());
178 static QString type2QString(
const int type);
187 QPolygonF ramerDouglasPeucker(qreal tol)
const;
190 static double distanceLine2Point2D(
const Shape &line,
const QPointF &point);
191 static double distanceLine2Line2D(
const Shape &line1,
const Shape &line2);
192 static double distancePoint2Point2D(
const QPointF &point1,
const QPointF &point2);