|
Krita Source Code Documentation
|
Strategy for deforming a segment of a path shape. More...
#include <KoPathSegmentChangeStrategy.h>
Inheritance diagram for KoPathSegmentChangeStrategy:Public Member Functions | |
| KUndo2Command * | createCommand () override |
| void | finishInteraction (Qt::KeyboardModifiers modifiers) override |
| void | handleMouseMove (const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override |
| KoPathSegmentChangeStrategy (KoPathTool *tool, const QPointF &pos, const KoPathPointData &segment, qreal segmentParam) | |
| ~KoPathSegmentChangeStrategy () override | |
Public Member Functions inherited from KoInteractionStrategy | |
| virtual void | cancelInteraction () |
| KoInteractionStrategy (KoToolBase *parent) | |
| constructor | |
| virtual void | paint (QPainter &painter, const KoViewConverter &converter) |
| KoToolBase * | tool () const |
| virtual | ~KoInteractionStrategy () |
| Destructor. | |
Private Attributes | |
| QPointF | m_ctrlPoint1Move |
| QPointF | m_ctrlPoint2Move |
| QPointF | m_lastPosition |
| QPointF | m_move |
| the accumulated point move amount | |
| QPointF | m_originalPosition |
| int | m_originalSegmentDegree |
| KoPathShape * | m_path |
| KoPathPointData | m_pointData1 |
| KoPathPointData | m_pointData2 |
| KoPathSegment | m_segment |
| qreal | m_segmentParam |
| KoPathTool * | m_tool |
| pointer to the path tool | |
Additional Inherited Members | |
Protected Member Functions inherited from KoInteractionStrategy | |
| uint | decorationThickness () const |
| uint | grabSensitivity () const |
| Convenience function to get the global grab sensitivity. | |
| uint | handleRadius () const |
| Convenience function to get the global handle radius. | |
| KoInteractionStrategy (KoInteractionStrategyPrivate &) | |
| constructor | |
Protected Attributes inherited from KoInteractionStrategy | |
| KoInteractionStrategyPrivate * | d_ptr |
Strategy for deforming a segment of a path shape.
Definition at line 21 of file KoPathSegmentChangeStrategy.h.
| KoPathSegmentChangeStrategy::KoPathSegmentChangeStrategy | ( | KoPathTool * | tool, |
| const QPointF & | pos, | ||
| const KoPathPointData & | segment, | ||
| qreal | segmentParam ) |
Definition at line 21 of file KoPathSegmentChangeStrategy.cpp.
References KoPathSegment::degree(), eps, m_originalSegmentDegree, m_path, m_pointData2, m_segment, m_segmentParam, KoPathShape::pathPointIndex(), KoPathPointData::pathShape, KoPathPointData::pointIndex, KoPathSegment::second, and KoPathShape::segmentByIndex().
|
override |
Definition at line 47 of file KoPathSegmentChangeStrategy.cpp.
|
overridevirtual |
For interactions that are undo-able this method should be implemented to return such a command. Implementations should return 0 otherwise.
Implements KoInteractionStrategy.
Definition at line 104 of file KoPathSegmentChangeStrategy.cpp.
References KoPathPoint::activeControlPoint1, KoPathPoint::activeControlPoint2, KoPathPoint::ControlPoint1, KoPathPoint::ControlPoint2, KoPathSegmentTypeCommand::Curve, KoPathSegment::first, kundo2_i18n(), m_ctrlPoint1Move, m_ctrlPoint2Move, m_originalSegmentDegree, m_pointData1, m_pointData2, m_segment, and KoPathSegment::second.
|
overridevirtual |
Override to make final changes to the data on the end of an interaction.
Implements KoInteractionStrategy.
Definition at line 99 of file KoPathSegmentChangeStrategy.cpp.
|
overridevirtual |
Extending classes should implement this method to update the selectedShapes based on the new mouse position.
| mouseLocation | the new location in pt |
| modifiers | OR-ed set of keys pressed. |
Implements KoInteractionStrategy.
Definition at line 51 of file KoPathSegmentChangeStrategy.cpp.
References KoPathPoint::activeControlPoint1, KoPathPoint::activeControlPoint2, KoToolBase::canvas(), KoPathPoint::ControlPoint1, KoPathPoint::ControlPoint2, KoPathSegment::controlPoints(), KoPathSegmentTypeCommand::Curve, KoPathSegment::degree(), KoShape::documentToShape(), KoPathSegment::first, KoPathSegment::interpolate(), KoPathSegment::isValid(), m_ctrlPoint1Move, m_ctrlPoint2Move, m_lastPosition, m_path, m_pointData1, m_pointData2, m_segment, m_segmentParam, m_tool, KoPathShape::normalize(), KisBezierUtils::offsetSegment(), KoPathPoint::point, KoPathControlPointMoveCommand::redo(), KoPathSegmentTypeCommand::redo(), KoPathSegment::second, KoSnapGuide::snap(), and KoCanvasBase::snapGuide.
|
private |
Definition at line 40 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 41 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 32 of file KoPathSegmentChangeStrategy.h.
|
private |
the accumulated point move amount
Definition at line 34 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 31 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 44 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 37 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 42 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 43 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 38 of file KoPathSegmentChangeStrategy.h.
|
private |
Definition at line 39 of file KoPathSegmentChangeStrategy.h.
|
private |
pointer to the path tool
Definition at line 36 of file KoPathSegmentChangeStrategy.h.