|
Krita Source Code Documentation
|
snaps to the canvas grid More...
#include <KoSnapStrategy.h>
Inheritance diagram for GridSnapStrategy:Public Member Functions | |
| QPainterPath | decoration (const KoViewConverter &converter) const override |
| returns the current snap strategy decoration | |
| GridSnapStrategy () | |
| bool | snap (const QPointF &mousePosition, KoSnapProxy *proxy, qreal maxSnapDistance) override |
Public Member Functions inherited from KoSnapStrategy | |
| KoSnapStrategy (KoSnapGuide::Strategy type) | |
| QPointF | snappedPosition () const |
| returns the snapped position form the last call to snapToPoints | |
| SnapType | snappedType () const |
| KoSnapGuide::Strategy | type () const |
| returns the strategies type | |
| virtual | ~KoSnapStrategy () |
Additional Inherited Members | |
Public Types inherited from KoSnapStrategy | |
| enum | SnapType { ToPoint = 0 , ToLine } |
Static Public Member Functions inherited from KoSnapStrategy | |
| static qreal | scalarProduct (const QPointF &p1, const QPointF &p2) |
| static qreal | squareDistance (const QPointF &p1, const QPointF &p2) |
Protected Member Functions inherited from KoSnapStrategy | |
| void | setSnappedPosition (const QPointF &position, SnapType snapType) |
| sets the current snapped position | |
snaps to the canvas grid
Definition at line 110 of file KoSnapStrategy.h.
| GridSnapStrategy::GridSnapStrategy | ( | ) |
Definition at line 421 of file KoSnapStrategy.cpp.
|
overridevirtual |
returns the current snap strategy decoration
Implements KoSnapStrategy.
Definition at line 488 of file KoSnapStrategy.cpp.
References decoration(), KoSnapStrategy::snappedPosition(), and KoViewConverter::viewToDocument().
|
overridevirtual |
Implements KoSnapStrategy.
Definition at line 426 of file KoSnapStrategy.cpp.
References KoSnapProxy::canvas(), KoCanvasBase::gridSize(), KoSnapStrategy::setSnappedPosition(), KoCanvasBase::snapToGrid(), KoSnapStrategy::ToLine, and KoSnapStrategy::ToPoint.