38 , m_activePoint(activePoint)
39 , m_activePointType(activePointType)
57 KoPathPoint::PointTypes nonHighlightedType = allPaintedTypes & ~m_activePointType;
86 if ((event->
button() & Qt::LeftButton) == 0)
88 if ((event->
modifiers() & Qt::ControlModifier) == 0) {
93 if (event->
modifiers() & Qt::ShiftModifier) {
164 , m_parameterShape(parameterShape)
165 , m_handleId(handleId)
183 if (event->
button() & Qt::LeftButton) {
QPair< int, int > KoPathPointIndex
The KisHandlePainterHelper class is a special helper for painting handles around objects....
void setHandleStyle(const KisHandleStyle &style)
static KisHandleStyle & highlightedPrimaryHandles()
static KisHandleStyle & selectedPrimaryHandles()
static KisHandleStyle & partiallyHighlightedPrimaryHandles()
virtual void addCommand(KUndo2Command *command)=0
Strategy for changing control points of parametric shapes.
void paintHandle(KisHandlePainterHelper &handlesHelper, int handleId)
Paint the given handles.
QPointF handlePosition(int handleId) const
Get the handle position.
Strategy for moving points of a path shape.
Describe a KoPathPoint by a KoPathShape and its indices.
Strategy for moving points of a path shape.
The undo / redo command for changing the path point type.
PointType
The type of the point.
A KoPathPoint represents a point in a path.
PointProperties properties
QRectF boundingRect(bool active=true) const
Get the bounding rect of the point.
KoPathShape * parent() const
Get the path shape the point belongs to.
@ IsSmooth
it is smooth, both control points on a line through the point
@ IsSymmetric
it is symmetric, like smooth but control points have same distance to point
PointType
the type for identifying part of a KoPathPoint
void paint(KisHandlePainterHelper &handlesHelper, PointTypes types, bool active=true)
The position of a path point within a path shape.
KoPathPointIndex pathPointIndex(const KoPathPoint *point) const
Returns the path point index of a given path point.
Qt::MouseButton button() const
return button pressed (see QMouseEvent::button());
Qt::KeyboardModifiers modifiers() const
QPointF point
The point in document coordinates.
QPointF shapeToDocument(const QPointF &point) const
Transforms point from shape coordinates to document coordinates.
static KisHandlePainterHelper createHandlePainterHelperView(QPainter *painter, KoShape *shape, const KoViewConverter &converter, qreal handleRadius=0.0, int decorationThickness=1)
KoParameterShape * m_parameterShape
ParameterHandle(KoPathTool *tool, KoParameterShape *parameterShape, int handleId)
void paint(QPainter &painter, const KoViewConverter &converter, qreal handleRadius, int decorationThickness) override
QRectF boundingRect() const override
KoInteractionStrategy * handleMousePress(KoPointerEvent *event) override
bool check(const QList< KoPathShape * > &selectedShapes) override
bool check(const QList< KoPathShape * > &selectedShapes) override
void trySelectHandle() override
PointHandle(KoPathTool *tool, KoPathPoint *activePoint, KoPathPoint::PointType activePointType)
KoPathPoint::PointType m_activePointType
QRectF boundingRect() const override
KoInteractionStrategy * handleMousePress(KoPointerEvent *event) override
KoPathPoint * activePoint() const
void paint(QPainter &painter, const KoViewConverter &converter, qreal handleRadius, int decorationThickness) override
KoPathPoint * m_activePoint
KoPathPoint::PointType activePointType() const
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)