|
Krita Source Code Documentation
|
#include <kis_temporary_paint_constraint.h>
Public Types | |
| enum class | InteractionMode { Normal , SnapToAngle } |
Public Member Functions | |
| QPointF | adjustPosition (const QPointF &point, const QPointF &strokeBegin, bool checkForInitialMovement, qreal moveThresholdPt) const |
| void | beginLine (const QPointF &anchor) |
| bool | hasLine () const |
| bool | hasValidLine () const |
| InteractionMode | interactionMode () const |
| bool | isLocked () const |
| QPointF | lineAnchor () const |
| QPointF | lineSecondPoint () const |
| void | setInteractionMode (InteractionMode mode) |
| void | setLocked (bool locked) |
| void | updateLine (const QPointF &secondPoint, bool snapToAngle=false) |
Private Attributes | |
| QPointF | m_anchor |
| bool | m_angleSnapped {false} |
| bool | m_hasLine {false} |
| InteractionMode | m_interactionMode {InteractionMode::Normal} |
| bool | m_locked {false} |
| QPointF | m_secondPoint |
Definition at line 13 of file kis_temporary_paint_constraint.h.
|
strong |
| Enumerator | |
|---|---|
| Normal | |
| SnapToAngle | |
Definition at line 16 of file kis_temporary_paint_constraint.h.
| QPointF KisTemporaryPaintConstraint::adjustPosition | ( | const QPointF & | point, |
| const QPointF & | strokeBegin, | ||
| bool | checkForInitialMovement, | ||
| qreal | moveThresholdPt ) const |
Definition at line 100 of file kis_temporary_paint_constraint.cpp.
References KisAlgebra2D::dotProduct(), hasValidLine(), m_anchor, m_locked, m_secondPoint, KisAlgebra2D::norm(), KisAlgebra2D::normSquared(), and qFuzzyIsNull().
| void KisTemporaryPaintConstraint::beginLine | ( | const QPointF & | anchor | ) |
Definition at line 42 of file kis_temporary_paint_constraint.cpp.
References m_anchor, m_angleSnapped, m_hasLine, m_locked, and m_secondPoint.
| bool KisTemporaryPaintConstraint::hasLine | ( | ) | const |
Definition at line 70 of file kis_temporary_paint_constraint.cpp.
References m_hasLine.
| bool KisTemporaryPaintConstraint::hasValidLine | ( | ) | const |
Definition at line 85 of file kis_temporary_paint_constraint.cpp.
References m_anchor, m_hasLine, m_secondPoint, and KisAlgebra2D::normSquared().
| KisTemporaryPaintConstraint::InteractionMode KisTemporaryPaintConstraint::interactionMode | ( | ) | const |
Definition at line 37 of file kis_temporary_paint_constraint.cpp.
References m_interactionMode.
| bool KisTemporaryPaintConstraint::isLocked | ( | ) | const |
Definition at line 80 of file kis_temporary_paint_constraint.cpp.
References m_locked.
| QPointF KisTemporaryPaintConstraint::lineAnchor | ( | ) | const |
Definition at line 90 of file kis_temporary_paint_constraint.cpp.
References m_anchor.
| QPointF KisTemporaryPaintConstraint::lineSecondPoint | ( | ) | const |
Definition at line 95 of file kis_temporary_paint_constraint.cpp.
References m_secondPoint.
| void KisTemporaryPaintConstraint::setInteractionMode | ( | InteractionMode | mode | ) |
Definition at line 32 of file kis_temporary_paint_constraint.cpp.
References m_interactionMode.
| void KisTemporaryPaintConstraint::setLocked | ( | bool | locked | ) |
Definition at line 75 of file kis_temporary_paint_constraint.cpp.
References hasValidLine(), and m_locked.
| void KisTemporaryPaintConstraint::updateLine | ( | const QPointF & | secondPoint, |
| bool | snapToAngle = false ) |
Definition at line 51 of file kis_temporary_paint_constraint.cpp.
References beginLine(), m_anchor, m_angleSnapped, m_hasLine, m_locked, and m_secondPoint.
|
private |
Definition at line 41 of file kis_temporary_paint_constraint.h.
|
private |
Definition at line 46 of file kis_temporary_paint_constraint.h.
|
private |
Definition at line 44 of file kis_temporary_paint_constraint.h.
|
private |
Definition at line 43 of file kis_temporary_paint_constraint.h.
|
private |
Definition at line 45 of file kis_temporary_paint_constraint.h.
|
private |
Definition at line 42 of file kis_temporary_paint_constraint.h.