32#include <QPainterPath>
38 return qIsNaN(
p.x()) || qIsNaN(
p.y());
42 : fillRule(Qt::OddEvenFill)
43 , autoFillMarkers(false)
48 : fillRule(rhs.fillRule)
49 , markersNew(rhs.markersNew)
50 , autoFillMarkers(rhs.autoFillMarkers)
56 return QRectF(
p.x() - radius,
p.y() - radius, 2*radius, 2*radius);
73 Q_FOREACH (
KoSubpath *subPath, rhs.
d->subpaths) {
113 path.setFillRule(
d->fillRule);
125 KoSubpathList::const_iterator pathIt(
subpaths.constBegin());
128 QPen pen(Qt::black, 0);
131 for (; pathIt !=
subpaths.constEnd(); ++pathIt) {
132 KoSubpath::const_iterator it((*pathIt)->constBegin());
133 for (; it != (*pathIt)->constEnd(); ++it) {
136 QRectF r(point->
point(), QSizeF(5, 5));
137 r.translate(-2.5, -2.5);
138 QPen pen(Qt::black, 0);
144 QBrush b(Qt::yellow);
147 QBrush b(Qt::darkYellow);
150 painter.drawEllipse(r);
159 KoSubpathList::const_iterator pathIt(
subpaths.constBegin());
160 for (; pathIt !=
subpaths.constEnd(); ++pathIt) {
161 KoSubpath::const_iterator it((*pathIt)->constBegin());
162 for (; it != (*pathIt)->constEnd(); ++it) {
163 debugFlake <<
"p:" << (*pathIt) <<
"," << *it <<
"," << (*it)->point() <<
"," << (*it)->properties();
171 KoSubpathList::const_iterator pathIt(
d->subpaths.constBegin());
173 for (; pathIt !=
d->subpaths.constEnd(); ++pathIt) {
174 KoSubpath::const_iterator it((*pathIt)->constBegin());
175 for (; it != (*pathIt)->constEnd(); ++it)
182 return outline().boundingRect();
188 for (
auto subpathIt =
d->subpaths.constBegin(); subpathIt !=
d->subpaths.constEnd(); ++subpathIt) {
190 const KoPathPoint * lastPoint = subpath->constFirst();
191 bool activeCP =
false;
192 for (
auto pointIt = subpath->constBegin(); pointIt != subpath->constEnd(); ++pointIt) {
194 KoPathPoint::PointProperties currProperties = currPoint->
properties();
195 if (currPoint == subpath->constFirst()) {
198 path.moveTo(currPoint->
point());
216 path.lineTo(currPoint->
point());
226 firstPoint->
point());
233 firstPoint->
point());
243 lastPoint = currPoint;
259 qreal outlineSweepWidth = 0;
263 outlineSweepWidth = lineBorder->lineWidth();
268 stroke()->strokeInsets(
this, inset);
273 outlineSweepWidth = std::max({outlineSweepWidth,
275 2.0 *
stroke()->strokeMaxMarkersInset(
this)});
284 QPen pen(Qt::black, outlineSweepWidth);
288 pen.setJoinStyle(Qt::RoundJoin);
289 pen.setCapStyle(Qt::RoundCap);
325 QSizeF oldSize =
size();
326 if (oldSize.width() == 0.0) {
327 oldSize.setWidth(0.000001);
329 if (oldSize.height() == 0.0) {
330 oldSize.setHeight(0.000001);
333 QSizeF sizeNew(newSize);
334 if (sizeNew.width() == 0.0) {
335 sizeNew.setWidth(0.000001);
337 if (sizeNew.height() == 0.0) {
338 sizeNew.setHeight(0.000001);
341 return QTransform(sizeNew.width() / oldSize.width(), 0, 0, sizeNew.height() / oldSize.height(), 0, 0);
348 path->push_back(point);
349 d->subpaths.push_back(path);
356 if (
d->subpaths.empty()) {
362 d->subpaths.last()->push_back(point);
369 if (
d->subpaths.empty()) {
377 d->subpaths.last()->push_back(point);
384 if (
d->subpaths.empty())
391 d->subpaths.last()->push_back(point);
398 if (
d->subpaths.empty()) {
404 lastPoint =
d->subpaths.last()->first();
406 QPointF startpoint(lastPoint->
point());
410 QPointF curvePoints[12];
411 int pointCnt =
arcToCurve(rx, ry, startAngle, sweepAngle, startpoint, curvePoints);
412 for (
int i = 0; i < pointCnt; i += 3) {
413 newEndPoint =
curveTo(curvePoints[i], curvePoints[i+1], curvePoints[i+2]);
418int KoPathShape::arcToCurve(qreal rx, qreal ry, qreal startAngle, qreal sweepAngle,
const QPointF & offset, QPointF * curvePoints)
const
423 if (sweepAngle == 0.0)
426 sweepAngle = qBound(-360.0, sweepAngle, 360.0);
428 if (rx == 0 || ry == 0) {
433 qreal parts = ceil(qAbs(sweepAngle / 90.0));
435 qreal sa_rad = startAngle *
M_PI / 180.0;
436 qreal partangle = sweepAngle / parts;
437 qreal endangle = startAngle + partangle;
438 qreal se_rad = endangle *
M_PI / 180.0;
439 qreal sinsa = sin(sa_rad);
440 qreal cossa = cos(sa_rad);
441 qreal kappa = 4.0 / 3.0 * tan((se_rad - sa_rad) / 4);
445 QPointF startpoint(offset);
448 QPointF center(startpoint - QPointF(cossa * rx, -sinsa * ry));
454 curvePoints[pointCnt++] = QPointF(startpoint - QPointF(sinsa * rx * kappa, cossa * ry * kappa));
456 qreal sinse = sin(se_rad);
457 qreal cosse = cos(se_rad);
460 QPointF endpoint(center + QPointF(cosse * rx, -sinse * ry));
462 curvePoints[pointCnt++] = QPointF(endpoint - QPointF(-sinse * rx * kappa, -cosse * ry * kappa));
463 curvePoints[pointCnt++] = endpoint;
466 startpoint = endpoint;
469 endangle += partangle;
470 se_rad = endangle *
M_PI / 180.0;
478 if (
d->subpaths.empty()) {
486 if (
d->subpaths.empty()) {
496 matrix.translate(-tl.x(), -tl.y());
507 KoSubpathList::const_iterator pathIt(
subpaths.constBegin());
508 for (; pathIt !=
subpaths.constEnd(); ++pathIt) {
509 KoSubpath::const_iterator it((*pathIt)->constBegin());
510 for (; it != (*pathIt)->constEnd(); ++it) {
525 KoPathPoint *subpathStart =
d->subpaths.last()->first();
532 path->push_back(newLastPoint);
533 d->subpaths.push_back(path);
534 *lastPoint = newLastPoint;
547 KoSubpathList::const_iterator pathIt(
d->subpaths.constBegin());
548 for (; pathIt !=
d->subpaths.constEnd(); ++pathIt) {
549 KoSubpath::const_iterator it((*pathIt)->constBegin());
550 for (; it != (*pathIt)->constEnd(); ++it) {
551 if (r.contains((*it)->point()))
553 else if (useControlPoints) {
554 if ((*it)->activeControlPoint1() && r.contains((*it)->controlPoint1()))
556 else if ((*it)->activeControlPoint2() && r.contains((*it)->controlPoint2()))
568 for (
int subpathIndex = 0; subpathIndex <
subpathCount; ++subpathIndex) {
569 KoSubpath * subpath =
d->subpaths[subpathIndex];
572 for (
int pointIndex = 0; pointIndex <
pointCount; ++pointIndex) {
573 if (pointIndex == (
pointCount - 1) && ! subpathClosed)
576 QRectF controlRect =
s.controlPointRect();
577 if (! r.intersects(controlRect) && ! controlRect.contains(r))
579 QRectF bound =
s.boundingRect();
580 if (! r.intersects(bound) && ! bound.contains(r))
591 for (
int subpathIndex = 0; subpathIndex <
d->subpaths.size(); ++subpathIndex) {
592 KoSubpath * subpath =
d->subpaths.at(subpathIndex);
593 for (
int pointPos = 0; pointPos < subpath->size(); ++pointPos) {
594 if (subpath->at(pointPos) == point) {
604 KoSubpath *subpath =
d->subPath(pointIndex.first);
606 if (subpath == 0 || pointIndex.second < 0 || pointIndex.second >= subpath->size())
609 return subpath->at(pointIndex.second);
616 KoSubpath *subpath =
d->subPath(pointIndex.first);
618 if (subpath != 0 && pointIndex.second >= 0 && pointIndex.second < subpath->size()) {
619 KoPathPoint * point = subpath->at(pointIndex.second);
620 int index = pointIndex.second;
627 if (index < subpath->
size()) {
637 KoSubpathList::const_iterator pathIt(
d->subpaths.constBegin());
638 for (; pathIt !=
d->subpaths.constEnd(); ++pathIt) {
639 i += (*pathIt)->size();
647 return d->subpaths.count();
652 KoSubpath *subpath =
d->subPath(subpathIndex);
657 return subpath->size();
662 KoSubpath *subpath =
d->subPath(subpathIndex);
670 return firstClosed && lastClosed;
675 KoSubpath *subpath =
d->subPath(pointIndex.first);
677 if (subpath == 0 || pointIndex.second < 0 || pointIndex.second > subpath->size())
680 KoPathPoint::PointProperties properties = point->
properties();
685 if (pointIndex.second == 0) {
696 else if (pointIndex.second == subpath->size()) {
709 subpath->insert(pointIndex.second , point);
717 KoSubpath *subpath =
d->subPath(pointIndex.first);
719 if (subpath == 0 || pointIndex.second < 0 || pointIndex.second >= subpath->size())
722 KoPathPoint * point = subpath->takeAt(pointIndex.second);
730 else if (pointIndex.second == 0) {
740 else if (pointIndex.second == subpath->size()) {
757 KoSubpath *subpath =
d->subPath(pointIndex.first);
759 if (!subpath || pointIndex.second < 0 || pointIndex.second > subpath->size() - 2
765 int size = subpath->size();
766 for (
int i = pointIndex.second + 1; i <
size; ++i) {
767 newSubpath->append(subpath->takeAt(pointIndex.second + 1));
775 d->subpaths.insert(pointIndex.first + 1, newSubpath);
783 KoSubpath *subpath =
d->subPath(subpathIndex);
784 KoSubpath *nextSubpath =
d->subPath(subpathIndex + 1);
800 d->subpaths.removeAt(subpathIndex + 1);
812 KoSubpath *subpath =
d->subPath(oldSubpathIndex);
814 if (subpath == 0 || newSubpathIndex >=
d->subpaths.size())
817 if (oldSubpathIndex == newSubpathIndex)
820 d->subpaths.removeAt(oldSubpathIndex);
821 d->subpaths.insert(newSubpathIndex, subpath);
830 KoSubpath *subpath =
d->subPath(pointIndex.first);
832 if (!subpath || pointIndex.second < 0 || pointIndex.second >= subpath->size()
843 for (
int i = 0; i < pointIndex.second; ++i) {
844 subpath->append(subpath->takeFirst());
858 KoSubpath *subpath =
d->subPath(pointIndex.first);
860 if (!subpath || pointIndex.second < 0 || pointIndex.second >= subpath->size()
871 for (
int i = 0; i < pointIndex.second; ++i) {
872 subpath->append(subpath->takeFirst());
886 KoSubpath *subpath =
d->subPath(subpathIndex);
891 int size = subpath->size();
892 for (
int i = 0; i <
size; ++i) {
902 KoPathPoint::PointProperties firstProps = first->
properties();
903 KoPathPoint::PointProperties lastProps = last->
properties();
923 KoSubpath *subpath =
d->subPath(subpathIndex);
929 d->subpaths.removeAt(subpathIndex);
939 if (subpathIndex < 0 || subpathIndex >
d->subpaths.size())
946 d->subpaths.insert(subpathIndex, subpath);
954 int insertSegmentPosition = -1;
955 if (!path)
return insertSegmentPosition;
957 QTransform pathMatrix = path->absoluteTransformation();
960 Q_FOREACH (
KoSubpath* subpath, path->d->subpaths) {
965 newPoint->
map(pathMatrix);
966 newPoint->
map(myMatrix);
967 newSubpath->append(newPoint);
969 d->subpaths.append(newSubpath);
971 if (insertSegmentPosition < 0) {
972 insertSegmentPosition =
d->subpaths.size() - 1;
978 return insertSegmentPosition;
983 if (!
d->subpaths.size())
1000 newPoint->
map(myMatrix);
1001 newSubpath->append(newPoint);
1003 shape->
d->subpaths.append(newSubpath);
1009 separatedPaths.append(shape);
1027 if (! subpath || subpath->size() < 2)
1034 if (lastPoint->
point() == firstPoint->
point()) {
1042 delete subpath->takeLast();
1044 lastPoint = subpath->last();
1066 return d->map(matrix);
1071 if (subpathIndex < 0 || subpathIndex >=
subpaths.size())
1087 KoSubpathList::const_iterator pathIt(
d->subpaths.constBegin());
1088 for (; pathIt !=
d->subpaths.constEnd(); ++pathIt) {
1089 KoSubpath::const_iterator pointIt((*pathIt)->constBegin());
1095 bool activeControlPoint2 =
false;
1098 for (; pointIt != (*pathIt)->constEnd(); ++pointIt) {
1101 qWarning() <<
"Found a zero point in the shape's path!";
1105 if (currPoint == firstPoint) {
1108 const QPointF
p = matrix.map(currPoint->
point());
1109 pathString += QString(
"M%1 %2").arg(
p.x()).arg(
p.y());
1121 const QPointF
p = matrix.map(cubicSeg.
second()->
point());
1122 pathString += QString(
"C%1 %2 %3 %4 %5 %6")
1123 .arg(cp1.x()).arg(cp1.y())
1124 .arg(cp2.x()).arg(cp2.y())
1125 .arg(
p.x()).arg(
p.y());
1130 const QPointF
p = matrix.map(currPoint->
point());
1131 pathString += QString(
"L%1 %2").arg(
p.x()).arg(
p.y());
1146 const QPointF
p = matrix.map(cubicSeg.
second()->
point());
1147 pathString += QString(
"C%1 %2 %3 %4 %5 %6")
1148 .arg(cp1.x()).arg(cp1.y())
1149 .arg(cp2.x()).arg(cp2.y())
1150 .arg(
p.x()).arg(
p.y());
1153 pathString += QString(
"Z");
1157 lastPoint = currPoint;
1180 KoSubpathList::const_iterator pathIt(
d->subpaths.constBegin());
1181 for (; pathIt !=
d->subpaths.constEnd(); ++pathIt) {
1182 KoSubpath::const_iterator it((*pathIt)->constBegin());
1183 for (; it != (*pathIt)->constEnd(); ++it) {
1184 if (it == (*pathIt)->constBegin()) {
1194 types.append(
nodeType(firstPoint));
1213 QString::const_iterator nIt(
nodeTypes.constBegin());
1214 KoSubpathList::const_iterator pathIt(
d->subpaths.constBegin());
1215 for (; pathIt !=
d->subpaths.constEnd(); ++pathIt) {
1216 KoSubpath::const_iterator it((*pathIt)->constBegin());
1217 for (; it != (*pathIt)->constEnd(); ++it, nIt++) {
1220 warnFlake <<
"not enough nodes in sodipodi:nodetypes";
1224 if (it != (*pathIt)->constBegin()) {
1251 int elementCount = path.elementCount();
1252 for (
int i = 0; i < elementCount; i++) {
1253 QPainterPath::Element element = path.elementAt(i);
1254 switch (element.type) {
1255 case QPainterPath::MoveToElement:
1256 shape->
moveTo(QPointF(element.x, element.y));
1258 case QPainterPath::LineToElement:
1259 shape->
lineTo(QPointF(element.x, element.y));
1261 case QPainterPath::CurveToElement:
1262 shape->
curveTo(QPointF(element.x, element.y),
1263 QPointF(path.elementAt(i + 1).x, path.elementAt(i + 1).y),
1264 QPointF(path.elementAt(i + 2).x, path.elementAt(i + 2).y));
1283 const QPainterPath outlinePath =
outline();
1286 stroke()->strokeInsets(
this, insets);
1287 QRectF roi(QPointF(-insets.
left, -insets.
top), QPointF(insets.
right, insets.
bottom));
1289 roi.moveCenter(point);
1290 if (outlinePath.intersects(roi) || outlinePath.contains(roi))
1293 if (outlinePath.contains(point))
1305 return outlinePath.contains(point);
1310 if (!
marker &&
d->markersNew.contains(pos)) {
1311 d->markersNew.remove(pos);
1322 return d->markersNew[pos].data();
1327 return !
d->markersNew.isEmpty();
1332 return d->autoFillMarkers;
1337 d->autoFillMarkers =
value;
1344 if (pointListener) {
1354 if (pointListener) {
1362 if (
d->subpaths.isEmpty()) {
1363 return QPainterPath();
1365 QPainterPath pathOutline;
1367 QPainterPathStroker stroker;
1368 stroker.setWidth(0);
1369 stroker.setJoinStyle(Qt::MiterJoin);
1370 stroker.setWidth(pen.widthF());
1371 stroker.setJoinStyle(pen.joinStyle());
1372 stroker.setMiterLimit(pen.miterLimit());
1373 stroker.setCapStyle(pen.capStyle());
1374 stroker.setDashOffset(pen.dashOffset());
1375 stroker.setDashPattern(pen.dashPattern());
1377 QPainterPath path = stroker.createStroke(
outline());
1379 pathOutline.addPath(path);
1380 pathOutline.setFillRule(Qt::WindingFill);
float value(const T *src, size_t ch)
quint64 part(quint64 n1, quint64 n2, int p)
static bool qIsNaNPoint(const QPointF &p)
static bool qIsNaNPoint(const QPointF &p)
char nodeType(const KoPathPoint *point)
void updateNodeType(KoPathPoint *point, const QChar &nodeType)
QList< KoPathPoint * > KoSubpath
a KoSubpath contains a path from a moveTo until a close or a new moveTo
QPair< int, int > KoPathPointIndex
The KisHandlePainterHelper class is a special helper for painting handles around objects....
QRectF clipRectForBoundingRect(const QRectF &boundingRect) const
Returns the clipping rectangle for the given bounding rect.
A KoPathPoint represents a point in a path.
PointProperties properties
void setProperties(PointProperties properties)
Set the properties of a point.
void setControlPoint1(const QPointF &point)
Set the control point 1.
void setProperty(PointProperty property)
Sets a single property of a point.
void setControlPoint2(const QPointF &point)
Set the control point 2.
void map(const QTransform &matrix)
apply matrix on the point
@ IsSmooth
it is smooth, both control points on a line through the point
@ StartSubpath
it starts a new subpath by a moveTo command
@ Normal
it has no control points
@ IsSymmetric
it is symmetric, like smooth but control points have same distance to point
@ CloseSubpath
it closes a subpath (only applicable on StartSubpath and StopSubpath)
@ StopSubpath
it stops a subpath (last point of subpath)
void unsetProperty(PointProperty property)
Removes a property from the point.
void setParent(KoPathShape *parent)
Sets the parent path shape.
A KoPathSegment consist of two neighboring KoPathPoints.
KoPathSegment toCubic() const
Returns cubic bezier curve segment of this segment.
void debugPath() const
print debug information about a the points of the path
void paintDebug(QPainter &painter)
void map(const QTransform &matrix)
QRectF handleRect(const QPointF &p, qreal radius) const
KoSubpath * subPath(int subpathIndex) const
Returns subpath at given index.
The position of a path point within a path shape.
const KoSubpathList & subpaths() const
bool autoFillMarkers() const
QTransform resizeMatrix(const QSizeF &newSize) const
bool breakAfter(const KoPathPointIndex &pointIndex)
Breaks the path after the point index.
int subpathPointCount(int subpathIndex) const
Returns the number of points in a subpath.
bool isClosedSubpath(int subpathIndex) const
Checks if a subpath is closed.
void map(const QTransform &matrix)
virtual QString pathShapeId() const
KoMarker * marker(KoFlake::MarkerPosition pos) const
bool reverseSubpath(int subpathIndex)
Reverse subpath.
KoPathPoint * lineTo(const QPointF &p)
Adds a new line segment.
bool hitTest(const QPointF &position) const override
reimplemented
void setAutoFillMarkers(bool value)
void recommendPointSelectionChange(const QList< KoPathPointIndex > &newSelection)
KoSubpath * removeSubpath(int subpathIndex)
Removes subpath from the path.
virtual QPointF normalize()
Normalizes the path data.
QSizeF size() const override
reimplemented
void close()
Closes the current subpath.
void notifyPointsChanged()
bool addSubpath(KoSubpath *subpath, int subpathIndex)
Adds a subpath at the given index to the path.
void setSize(const QSizeF &size) override
QRectF outlineRect() const override
reimplemented
QPainterPath pathStroke(const QPen &pen) const
Qt::FillRule fillRule() const
Returns the fill rule for the path object.
void closeMerge()
Closes the current subpath.
void setFillRule(Qt::FillRule fillRule)
Sets the fill rule to be used for painting the background.
KoPathPoint * moveTo(const QPointF &p)
Starts a new Subpath.
int arcToCurve(qreal rx, qreal ry, qreal startAngle, qreal sweepAngle, const QPointF &offset, QPointF *curvePoints) const
Add an arc.
int pointCount() const
Returns the number of points in the path.
bool moveSubpath(int oldSubpathIndex, int newSubpathIndex)
Moves the position of a subpath within a path.
void closeSubpathPriv(KoSubpath *subpath)
closes specified subpath
bool join(int subpathIndex)
Joins the given subpath with the following one.
QList< KoPathPoint * > pointsAt(const QRectF &rect, const bool useControlPoints=false) const
Returns the path points within the given rectangle.
void setMarker(KoMarker *marker, KoFlake::MarkerPosition pos)
bool separate(QList< KoPathShape * > &separatedPaths)
Creates separate path shapes, one for each existing subpath.
void updateLastPriv(KoPathPoint **lastPoint)
QList< KoPathSegment > segmentsAt(const QRectF &rect) const
Returns the list of path segments within the given rectangle.
void paint(QPainter &painter) const override
reimplemented
KoShape * cloneShape() const override
creates a deep copy of the shape or shape's subtree
KoPathPointIndex closeSubpath(const KoPathPointIndex &pointIndex)
Close a open subpath.
KoPathPoint * arcTo(qreal rx, qreal ry, qreal startAngle, qreal sweepAngle)
Add an arc.
KoPathPointIndex openSubpath(const KoPathPointIndex &pointIndex)
Opens a closed subpath.
QString toString(const QTransform &matrix=QTransform()) const
Returns a odf/svg string representation of the path data with the given matrix applied.
QPainterPath outline() const override
reimplemented
KoPathPoint * curveTo(const QPointF &c1, const QPointF &c2, const QPointF &p)
Adds a new cubic Bezier curve segment.
QString nodeTypes() const
Saves the node types.
QRectF boundingRect() const override
reimplemented
KoPathPoint * removePoint(const KoPathPointIndex &pointIndex)
Removes a point from the path.
int subpathCount() const
Returns the number of subpaths in the path.
static KoPathShape * createShapeFromPainterPath(const QPainterPath &path)
Creates path shape from given QPainterPath.
KoPathSegment segmentByIndex(const KoPathPointIndex &pointIndex) const
Returns the segment specified by a path point index.
virtual void paintPoints(KisHandlePainterHelper &handlesHelper)
KoPathPointIndex pathPointIndex(const KoPathPoint *point) const
Returns the path point index of a given path point.
void loadNodeTypes(const QString &nodeTypes)
Loads node types.
KoPathPoint * pointByIndex(const KoPathPointIndex &pointIndex) const
Returns the path point specified by a path point index.
QScopedPointer< Private > d
void closeMergeSubpathPriv(KoSubpath *subpath)
close-merges specified subpath
void clear()
Removes all subpaths and their points from the path.
bool insertPoint(KoPathPoint *point, const KoPathPointIndex &pointIndex)
Inserts a new point into the given subpath at the specified position.
int combine(KoPathShape *path)
Combines two path shapes by appending the data of the specified path.
bool isClipped(const KoShape *child) const
void insets(KoInsets &insets) const
Fills the insets object with the space the shadow takes around a shape.
QList< KoShape::ShapeChangeListener * > listeners
KoShapeContainer * parent
void setZIndex(qint16 zIndex)
virtual KoShapeStrokeModelSP stroke() const
void applyTransformation(const QTransform &matrix)
void shapeChangedPriv(KoShape::ChangeType type)
virtual void setStroke(KoShapeStrokeModelSP stroke)
QTransform absoluteTransformation() const
KoShapeShadow * shadow() const
Returns the currently set shadow or 0 if there is no shadow set.
virtual void setBackground(QSharedPointer< KoShapeBackground > background)
ChangeType
Used by shapeChanged() to select which change was made.
@ StrokeChanged
the shapes stroke has changed
@ ContentChanged
the content of the shape changed e.g. a new image inside a pixmap/text change inside a textshape
virtual QSharedPointer< KoShapeBackground > background() const
KoFilterEffectStack * filterEffectStack() const
QSharedDataPointer< SharedData > s
void setShapeId(const QString &id)
QTransform transform() const
return the current matrix that contains the rotation/scale/position of this shape
virtual void setSize(const QSizeF &size)
Resize the shape.
QPointF position() const
Get the position of the shape in pt.
T kisGrowRect(const T &rect, U offset)
qreal bottom
Bottom inset.
virtual void recommendPointSelectionChange(KoPathShape *shape, const QList< KoPathPointIndex > &newSelection)=0
virtual void notifyPathPointsChanged(KoPathShape *shape)=0
void notifyShapeChanged(ChangeType type, KoShape *shape) override