17 : m_snapGuide(snapGuide)
27 if (
rect.contains(point))
39 const int index =
shapes.indexOf(shape);
46 if (omitEditedShape) {
57 if (
rect.intersects(bound) ||
rect.contains(bound))
79 int subpathCount = path->subpathCount();
80 for (
int subpathIndex = 0; subpathIndex < subpathCount; ++subpathIndex) {
81 int pointCount = path->subpathPointCount(subpathIndex);
82 for (
int pointIndex = 0; pointIndex < pointCount; ++pointIndex) {
84 if (!
p || ignoredPoints.contains(
p))
87 snapPoints.append(m.map(
p->point()));
95 snapPoints.append(bbox.topLeft());
96 snapPoints.append(bbox.topRight());
97 snapPoints.append(bbox.bottomRight());
98 snapPoints.append(bbox.bottomLeft());
116 shapeSegments = path->segmentsAt(rectOnShape);
120 if (!
rect.intersects(controlRect) && ! controlRect.contains(
rect))
123 if (!
rect.intersects(bound) && ! bound.contains(
rect))
125 shapeSegments.append(s);
132 if (ignoredPoints.contains(s.
first()) || ignoredPoints.contains(s.
second()))
134 segments.append(s.
mapped(m));
147 Q_FOREACH (
KoShape * shape, allShapes) {
149 !ignoredShapes.contains(shape) &&
152 filteredShapes.append(shape);
156 if (omitEditedShape) {
158 const int index = filteredShapes.indexOf(point->
parent());
160 filteredShapes.removeAt(index);
169 return filteredShapes;
QPair< int, int > KoPathPointIndex
virtual KoShapeManager * shapeManager() const =0
A KoPathPoint represents a point in a path.
KoPathShape * parent() const
Get the path shape the point belongs to.
A KoPathSegment consist of two neighboring KoPathPoints.
KoPathSegment mapped(const QTransform &matrix) const
Returns transformed segment.
QRectF controlPointRect() const
Returns the control point bounding rect.
QRectF boundingRect() const
Returns the axis aligned tight bounding rect.
The position of a path point within a path shape.
QList< KoShape * > shapes
QList< KoShape * > shapesAt(const QRectF &rect, bool omitHiddenShapes=true, bool containedMode=false)
virtual KoSnapData snapData() const
Returns additional snap data the shape wants to have snapping to.
QPointF documentToShape(const QPointF &point) const
Transforms point from document coordinates to shape coordinates.
virtual QRectF boundingRect() const
Get the bounding box of the shape.
QTransform absoluteTransformation() const
bool isVisible(bool recursive=true) const
QList< KoPathSegment > snapSegments() const
Returns list of segments to snap to.
QList< QPointF > snapPoints() const
Returns list of points to snap to.
QList< KoShape * > ignoredShapes
QList< KoPathPoint * > ignoredPathPoints() const
Returns list of ignored points.
KoShape * additionalEditedShape
KoSnapGuide * m_snapGuide
QList< QPointF > pointsFromShape(KoShape *shape)
returns list of points from given shape
QList< KoShape * > shapesInRect(const QRectF &rect, bool omitEditedShape=false)
returns list of shape in given rectangle in document coordinates
KoSnapProxy(KoSnapGuide *snapGuide)
KoCanvasBase * canvas()
returns canvas we are working on
QList< KoPathSegment > segmentsInRect(const QRectF &rect, bool omitEditedShape)
returns list of points in given rectangle in document coordinates
QList< QPointF > pointsInRect(const QRectF &rect, bool omitEditedShape)
returns list of points in given rectangle in document coordinates
QList< KoShape * > shapes(bool omitEditedShape=false)
returns list of all shapes