#include <kis_curve_paintop.h>
|
| | KisCurvePaintOp (const KisPaintOpSettingsSP settings, KisPainter *painter, KisNodeSP node, KisImageSP image) |
| |
| void | paintLine (const KisPaintInformation &pi1, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance) override |
| |
| | ~KisCurvePaintOp () override |
| |
| virtual bool | canPaint () const |
| |
| virtual std::pair< int, bool > | doAsynchronousUpdate (QVector< KisRunnableStrokeJobData * > &jobs) |
| |
| | KisPaintOp (KisPainter *painter) |
| |
| void | paintAt (const KisPaintInformation &info, KisDistanceInformation *currentDistance) |
| |
| virtual void | paintBezierCurve (const KisPaintInformation &pi1, const QPointF &control1, const QPointF &control2, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance) |
| |
| | Private (KisPaintOp *_q) |
| |
| void | updateSpacing (const KisPaintInformation &info, KisDistanceInformation ¤tDistance) const |
| |
| void | updateTiming (const KisPaintInformation &info, KisDistanceInformation ¤tDistance) const |
| |
| virtual | ~KisPaintOp () |
| |
| | Private (KisCanvas2 *c) |
| |
| bool | deref () |
| |
| bool | ref () |
| |
| int | refCount () |
| |
| QAtomicInt * | sharedWeakReference () |
| |
Definition at line 18 of file kis_curve_paintop.h.
◆ KisCurvePaintOp()
◆ ~KisCurvePaintOp()
| KisCurvePaintOp::~KisCurvePaintOp |
( |
| ) |
|
|
override |
◆ paintAt()
The implementation of painting of a dab and updating spacing. This does NOT need to update the timing information.
Implements KisPaintOp.
Definition at line 44 of file kis_curve_paintop.cpp.
45{
47}
KisSpacingInformation updateSpacingImpl(const KisPaintInformation &info) const override
References updateSpacingImpl().
◆ paintLine() [1/2]
Draw a line between pos1 and pos2 using the currently set brush and color. If savedDist is less than zero, the brush is painted at pos1 before being painted along the line using the spacing setting.
- Returns
- the drag distance, that is the remains of the distance between p1 and p2 not covered because the currently set brush has a spacing greater than that distance.
Reimplemented from KisPaintOp.
Definition at line 55 of file kis_curve_paintop.cpp.
56{
57 Q_UNUSED(currentDistance);
59
62 }
63 else {
65 }
66
68
70
74}
void paintLine(const KisPaintInformation &pi1, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance) override
void apply(KisPainter *painter, const KisPaintInformation &info) const
KisPaintDeviceSP createCompositionSourceDevice() const
void renderMirrorMask(QRect rc, KisFixedPaintDeviceSP dab)
void bitBlt(qint32 dstX, qint32 dstY, const KisPaintDeviceSP srcDev, qint32 srcX, qint32 srcY, qint32 srcWidth, qint32 srcHeight)
KisPaintDeviceSP source() const
References KisOpacityOption::apply(), KisPainter::bitBlt(), KisPaintDevice::clear(), KisPaintDevice::createCompositionSourceDevice(), KisPaintDevice::extent(), m_dab, m_opacityOption, KisPaintOp::painter, paintLine(), KisPainter::renderMirrorMask(), and KisPaintOp::source().
◆ paintLine() [2/2]
Definition at line 76 of file kis_curve_paintop.cpp.
77{
81 }
82
84
86
87 while (
m_points.length() > maxPoints) {
89 }
90
93
94 QPen pen(QBrush(Qt::white), lineWidth);
95 QPainterPath path;
96
98 path.moveTo(pi1.
pos());
99 path.lineTo(pi2.
pos());
101 path = QPainterPath();
102 }
103
104 if (
m_points.length() >= maxPoints) {
105
107
110 }
111 else {
112
113 int step = maxPoints / 3;
115 }
116
121 }
122}
QList< QPointF > m_points
void drawPainterPath(const QPainterPath &path, const QPen &pen, const QRect &requestedRect)
void setOpacityF(qreal opacity)
void setPaintColor(const KoColor &color)
qreal apply(const KisPaintInformation &info) const
qreal curve_curves_opacity
int curve_stroke_history_size
bool curve_paint_connection_line
KisFixedPaintDeviceSP dab
References KisStandardOption< Data >::apply(), KisCurveOpOptionData::curve_curves_opacity, KisCurveOpOptionData::curve_line_width, KisCurveOpOptionData::curve_paint_connection_line, KisCurveOpOptionData::curve_smoothing, KisCurveOpOptionData::curve_stroke_history_size, KisPaintOp::dab, KisPainter::drawPainterPath(), KisLodTransformBase::lodToScale(), m_curveOpOption, m_curvesOpacityOption, m_lineWidthOption, m_painter, m_points, KisPaintOp::painter, KisPaintInformation::pos(), KisPainter::setOpacityF(), KisPainter::setOpacityToUnit(), and KisPainter::setPaintColor().
◆ updateSpacingImpl()
◆ m_curveOpOption
◆ m_curvesOpacityOption
◆ m_dab
◆ m_dev
◆ m_lineWidthOption
◆ m_opacityOption
◆ m_painter
◆ m_points
| QList<QPointF> KisCurvePaintOp::m_points |
|
private |
The documentation for this class was generated from the following files: