|
Krita Source Code Documentation
|
snaps to shape bounding boxes More...
#include <KoSnapStrategy.h>
Inheritance diagram for BoundingBoxSnapStrategy:Public Member Functions | |
| BoundingBoxSnapStrategy () | |
| QPainterPath | decoration (const KoViewConverter &converter) const override |
| returns the current snap strategy decoration | |
| 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 () |
Private Member Functions | |
| qreal | squareDistanceToLine (const QPointF &lineA, const QPointF &lineB, const QPointF &point, QPointF &pointOnLine) |
Private Attributes | |
| QPointF | m_boxPoints [5] |
Friends | |
| class | TestSnapStrategy |
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 shape bounding boxes
Definition at line 119 of file KoSnapStrategy.h.
| BoundingBoxSnapStrategy::BoundingBoxSnapStrategy | ( | ) |
Definition at line 499 of file KoSnapStrategy.cpp.
|
overridevirtual |
returns the current snap strategy decoration
Implements KoSnapStrategy.
Definition at line 576 of file KoSnapStrategy.cpp.
References decoration(), KoSnapStrategy::snappedPosition(), and KoViewConverter::viewToDocument().
|
overridevirtual |
Implements KoSnapStrategy.
Definition at line 504 of file KoSnapStrategy.cpp.
References KoShape::absolutePosition(), KoFlake::BottomLeft, KoFlake::BottomRight, KoFlake::Center, m_boxPoints, KoSnapStrategy::setSnappedPosition(), KoSnapProxy::shapesInRect(), KoSnapStrategy::squareDistance(), squareDistanceToLine(), KoSnapStrategy::ToLine, KoFlake::TopLeft, KoSnapStrategy::ToPoint, and KoFlake::TopRight.
|
private |
Definition at line 558 of file KoSnapStrategy.cpp.
References KoSnapStrategy::scalarProduct().
|
friend |
Definition at line 121 of file KoSnapStrategy.h.
|
private |
Definition at line 128 of file KoSnapStrategy.h.