51 bool alreadyIn =
false;
69 it.value().insert(point);
160 std::sort(pd.begin(), pd.end());
166 for (; it != pd.constEnd(); ++it) {
167 if (it->pointIndex.second == 0)
168 lastSubpathStart = *it;
171 && last.
pointIndex.first == it->pointIndex.first
172 && last.
pointIndex.second + 1 == it->pointIndex.second) {
173 pointData.append(last);
176 if (lastSubpathStart.
pathShape == it->pathShape
179 pointData.append(*it);
208 bool selectionHasChanged =
false;
215 QSet<KoPathPoint *>::iterator pointIt(it.value().begin());
216 for (; pointIt != it.value().end(); ++pointIt) {
220 selectionHasChanged =
true;
222 QSet<KoPathPoint *>::iterator pointIt(it.value().begin());
223 while (pointIt != it.value().end()) {
224 if ((*pointIt)->parent()->pathPointIndex(*pointIt) ==
KoPathPointIndex(-1, -1)) {
226 pointIt = it.value().erase(pointIt);
227 selectionHasChanged =
true;
236 if (selectionHasChanged)
247 QSet<KoPathPoint*> selectedShapePoints =
m_shapePointMap.value(shape, QSet<KoPathPoint*>());
249 Q_FOREACH (
KoPathPoint *point, selectedShapePoints) {
265 QSet<KoPathPoint*> selectedShapePoints =
m_shapePointMap.value(shape, QSet<KoPathPoint*>());
267 Q_FOREACH (
KoPathPoint *point, selectedShapePoints) {
285 QSet<KoPathPoint*> selectedShapePoints =
m_shapePointMap.value(pathShape, QSet<KoPathPoint*>());
286 Q_FOREACH (
KoPathPoint *point, selectedShapePoints) {
QPair< int, int > KoPathPointIndex
The KisHandlePainterHelper class is a special helper for painting handles around objects....
void setHandleStyle(const KisHandleStyle &style)
static KisHandleStyle & selectedPrimaryHandles()
bool isParametricShape() const
Check if object is a parametric shape.
Describe a KoPathPoint by a KoPathShape and its indices.
KoPathPointIndex pointIndex
position of the point in the path shape
KoPathShape * pathShape
path shape the path point belongs too
A KoPathPoint represents a point in a path.
KoPathShape * parent() const
Get the path shape the point belongs to.
@ StartSubpath
it starts a new subpath by a moveTo command
@ CloseSubpath
it closes a subpath (only applicable on StartSubpath and StopSubpath)
The position of a path point within a path shape.
QRectF outlineRect() const override
reimplemented
QList< KoPathPoint * > pointsAt(const QRectF &rect, const bool useControlPoints=false) const
Returns the path points within the given rectangle.
KoPathPointIndex pathPointIndex(const KoPathPoint *point) const
Returns the path point index of a given path point.
KoPathPoint * pointByIndex(const KoPathPointIndex &pointIndex) const
Returns the path point specified by a path point index.
void addShapeChangeListener(ShapeChangeListener *listener)
void removeShapeChangeListener(ShapeChangeListener *listener)
QPointF documentToShape(const QPointF &point) const
Transforms point from document coordinates to shape coordinates.
KoShapeContainer * parent() const
static KisHandlePainterHelper createHandlePainterHelperView(QPainter *painter, KoShape *shape, const KoViewConverter &converter, qreal handleRadius=0.0, int decorationThickness=1)
ChangeType
Used by shapeChanged() to select which change was made.
@ Deleted
the shape was deleted
#define KIS_SAFE_ASSERT_RECOVER(cond)
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
void notifyShapeChanged(ChangeType type, KoShape *shape) override