Differential D15540 Diff 43017 plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphicShape.h
Changeset View
Changeset View
Standalone View
Standalone View
plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphicShape.h
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 88 | public: | |||
---|---|---|---|---|---|
89 | explicit KarbonCalligraphicShape(qreal caps = 0.0); | 89 | explicit KarbonCalligraphicShape(qreal caps = 0.0); | ||
90 | ~KarbonCalligraphicShape() override; | 90 | ~KarbonCalligraphicShape() override; | ||
91 | 91 | | |||
92 | KoShape* cloneShape() const override; | 92 | KoShape* cloneShape() const override; | ||
93 | 93 | | |||
94 | void appendPoint(const QPointF &p1, qreal angle, qreal width); | 94 | void appendPoint(const QPointF &p1, qreal angle, qreal width); | ||
95 | void appendPointToPath(const KarbonCalligraphicPoint &p); | 95 | void appendPointToPath(const KarbonCalligraphicPoint &p); | ||
96 | 96 | | |||
97 | // returns the bounding rect of whan needs to be repainted | 97 | // returns the bounding rect of what needs to be repainted | ||
98 | // after new points are added | 98 | // after new points are added | ||
99 | const QRectF lastPieceBoundingRect(); | 99 | const QRectF lastPieceBoundingRect(); | ||
100 | 100 | | |||
101 | void setSize(const QSizeF &newSize) override; | 101 | void setSize(const QSizeF &newSize) override; | ||
102 | //virtual QPointF normalize(); | 102 | //virtual QPointF normalize(); | ||
103 | 103 | | |||
104 | QPointF normalize() override; | 104 | QPointF normalize() override; | ||
105 | 105 | | |||
Show All 11 Lines | 115 | void moveHandleAction(int handleId, | |||
117 | Qt::KeyboardModifiers modifiers = Qt::NoModifier) override; | 117 | Qt::KeyboardModifiers modifiers = Qt::NoModifier) override; | ||
118 | 118 | | |||
119 | // reimplemented | 119 | // reimplemented | ||
120 | void updatePath(const QSizeF &size) override; | 120 | void updatePath(const QSizeF &size) override; | ||
121 | 121 | | |||
122 | private: | 122 | private: | ||
123 | KarbonCalligraphicShape(const KarbonCalligraphicShape &rhs); | 123 | KarbonCalligraphicShape(const KarbonCalligraphicShape &rhs); | ||
124 | 124 | | |||
125 | // auxiliary function that actually insererts the points | 125 | // auxiliary function that actually inserts the points | ||
126 | // without doing any additional checks | 126 | // without doing any additional checks | ||
127 | // the points should be given in canvas coordinates | 127 | // the points should be given in canvas coordinates | ||
128 | void appendPointsToPathAux(const QPointF &p1, const QPointF &p2); | 128 | void appendPointsToPathAux(const QPointF &p1, const QPointF &p2); | ||
129 | 129 | | |||
130 | // function to detect a flip, given the points being inserted | 130 | // function to detect a flip, given the points being inserted | ||
131 | bool flipDetected(const QPointF &p1, const QPointF &p2); | 131 | bool flipDetected(const QPointF &p1, const QPointF &p2); | ||
132 | 132 | | |||
133 | void smoothLastPoints(); | 133 | void smoothLastPoints(); | ||
Show All 18 Lines |