|
Krita Source Code Documentation
|
#include <kis_experiment_paintop.h>
Inheritance diagram for KisExperimentPaintOp:Public Member Functions | |
| KisExperimentPaintOp (const KisPaintOpSettingsSP settings, KisPainter *painter, KisNodeSP node, KisImageSP image) | |
| void | paintLine (const KisPaintInformation &pi1, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance) override |
| ~KisExperimentPaintOp () override | |
Public Member Functions inherited from KisPaintOp | |
| 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 () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Member Functions inherited from KisShared | |
| bool | deref () |
| bool | ref () |
| int | refCount () |
| QAtomicInt * | sharedWeakReference () |
Protected Member Functions | |
| KisSpacingInformation | paintAt (const KisPaintInformation &info) override |
| KisSpacingInformation | updateSpacingImpl (const KisPaintInformation &info) const override |
Protected Member Functions inherited from KisPaintOp | |
| KisFixedPaintDeviceSP | cachedDab () |
| KisFixedPaintDeviceSP | cachedDab (const KoColorSpace *cs) |
| KisPainter * | painter () const |
| KisPaintDeviceSP | source () const |
| virtual KisTimingInformation | updateTimingImpl (const KisPaintInformation &info) const |
Protected Member Functions inherited from KisShared | |
| KisShared () | |
| ~KisShared () | |
Private Member Functions | |
| void | paintRegion (const KisRegion &changedRegion) |
| QPointF | speedCorrectedPosition (const KisPaintInformation &pi1, const KisPaintInformation &pi2) |
Static Private Member Functions | |
| static QPainterPath | applyDisplace (const QPainterPath &path, int speed) |
| static QPointF | getAngle (const QPointF &p1, const QPointF &p2, qreal distance) |
| static qreal | simplifyThreshold (const QRectF &bounds) |
Private Attributes | |
| QPointF | m_center |
| int | m_displaceCoeff {0} |
| bool | m_displaceEnabled {false} |
| KisExperimentOpOptionData | m_experimentOption |
| KisPainter::FillStyle | m_fillStyle {KisPainter::FillStyleNone} |
| bool | m_firstRun {true} |
| bool | m_hardEdge {false} |
| QPainterPath | m_lastPaintedPath |
| int | m_lastPaintTime {0} |
| KisPaintDeviceSP | m_originalDevice |
| KisPainter * | m_originalPainter {0} |
| QPainterPath | m_path |
| QVector< QPointF > | m_savedPoints |
| int | m_savedSmoothingDistance {1} |
| QPointF | m_savedSmoothingPoint |
| qreal | m_savedSpeedCoeff {1.0} |
| QPointF | m_savedSpeedPoint |
| int | m_savedUpdateDistance {1} |
| bool | m_smoothingEnabled {false} |
| int | m_smoothingThreshold {1} |
| bool | m_speedEnabled {false} |
| int | m_speedMultiplier {1} |
| bool | m_useMirroring {false} |
| bool | m_windingFill {false} |
Additional Inherited Members | |
Static Public Member Functions inherited from KisPaintOp | |
| static void | splitCoordinate (qreal coordinate, qint32 *whole, qreal *fraction) |
Public Attributes inherited from KisPaintOp | |
| KisFixedPaintDeviceSP | dab |
| bool | fanCornersEnabled {false} |
| qreal | fanCornersStep {1.0} |
| KisPainter * | painter {nullptr} |
| KisPaintOp * | q {nullptr} |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Definition at line 25 of file kis_experiment_paintop.h.
| KisExperimentPaintOp::KisExperimentPaintOp | ( | const KisPaintOpSettingsSP | settings, |
| KisPainter * | painter, | ||
| KisNodeSP | node, | ||
| KisImageSP | image ) |
Definition at line 26 of file kis_experiment_paintop.cpp.
References COMPOSITE_COPY, KisPaintDevice::createCompositionSourceDevice(), KisSharedPtr< T >::data(), KisExperimentOpOptionData::displacement, KisPainter::FillStyleForegroundColor, KisPainter::FillStylePattern, KisExperimentOpOptionData::fillType, KisExperimentOpOptionData::hardEdge, KisPainter::hasMirroring(), KisExperimentOpOptionData::isDisplacementEnabled, KisExperimentOpOptionData::isSmoothingEnabled, KisExperimentOpOptionData::isSpeedEnabled, m_displaceCoeff, m_displaceEnabled, m_experimentOption, m_fillStyle, m_firstRun, m_hardEdge, m_originalDevice, m_originalPainter, m_smoothingEnabled, m_smoothingThreshold, m_speedEnabled, m_speedMultiplier, m_useMirroring, m_windingFill, KisPainter::paintColor, KisPaintOp::painter, KisPainter::pattern, Pattern, KisExperimentOpOptionData::read(), KisPainter::setCompositeOpId(), KisPainter::setFillStyle(), KisPainter::setPaintColor(), KisPainter::setPattern(), KisExperimentOpOptionData::smoothing, KisPaintOp::source(), KisExperimentOpOptionData::speed, and KisExperimentOpOptionData::windingFill.
|
override |
Definition at line 70 of file kis_experiment_paintop.cpp.
References m_originalPainter.
|
staticprivate |
Definition at line 301 of file kis_experiment_paintop.cpp.
References getAngle().
|
staticprivate |
Definition at line 294 of file kis_experiment_paintop.cpp.
References distance(), p1, and p2.
|
overrideprotectedvirtual |
The implementation of painting of a dab and updating spacing. This does NOT need to update the timing information.
Implements KisPaintOp.
Definition at line 250 of file kis_experiment_paintop.cpp.
References updateSpacingImpl().
|
overridevirtual |
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.
Refresh rate at least 25fps
Rendering the path with diff'ed rects is up to two times more efficient for really huge shapes (tested on 2000+ px shapes), however for smaller ones doing paths arithmetics eats too much time. That's why we choose the method on the base of the size of the shape.
Reimplemented from KisPaintOp.
Definition at line 121 of file kis_experiment_paintop.cpp.
References applyDisplace(), KisRegion::boundingRect(), bounds, KisPaintInformation::currentTime(), length(), m_center, m_displaceCoeff, m_displaceEnabled, m_firstRun, m_lastPaintedPath, m_lastPaintTime, m_path, m_savedPoints, m_savedSmoothingDistance, m_savedSmoothingPoint, m_savedSpeedCoeff, m_savedSpeedPoint, m_savedUpdateDistance, m_smoothingEnabled, m_smoothingThreshold, m_speedEnabled, KisPaintOp::painter, paintRegion(), KisPaintInformation::pos(), simplifyThreshold(), speedCorrectedPosition(), KritaUtils::splitPath(), KritaUtils::splitTriangles(), and KritaUtils::trySimplifyPath().
Definition at line 75 of file kis_experiment_paintop.cpp.
References COMPOSITE_COPY, KisPainter::fillPainterPath(), m_fillStyle, m_hardEdge, m_originalDevice, m_originalPainter, m_path, m_useMirroring, m_windingFill, KisPaintOp::painter, KisRegion::rects(), KisPainter::renderDabWithMirroringNonIncremental(), KisPainter::setAntiAliasPolygonFill(), KisPainter::setCompositeOpId(), and KisPainter::setFillStyle().
|
staticprivate |
Definition at line 288 of file kis_experiment_paintop.cpp.
References bounds.
|
private |
Definition at line 103 of file kis_experiment_paintop.cpp.
References m_savedSpeedCoeff, m_savedSpeedPoint, m_speedMultiplier, and KisPaintInformation::pos().
|
overrideprotectedvirtual |
Implementation of a spacing update
Implements KisPaintOp.
Definition at line 255 of file kis_experiment_paintop.cpp.
|
private |
Definition at line 73 of file kis_experiment_paintop.h.
|
private |
Definition at line 52 of file kis_experiment_paintop.h.
|
private |
Definition at line 51 of file kis_experiment_paintop.h.
|
private |
Definition at line 76 of file kis_experiment_paintop.h.
|
private |
Definition at line 82 of file kis_experiment_paintop.h.
|
private |
Definition at line 72 of file kis_experiment_paintop.h.
|
private |
Definition at line 56 of file kis_experiment_paintop.h.
|
private |
Definition at line 53 of file kis_experiment_paintop.h.
|
private |
Definition at line 70 of file kis_experiment_paintop.h.
|
private |
Definition at line 80 of file kis_experiment_paintop.h.
|
private |
Definition at line 79 of file kis_experiment_paintop.h.
|
private |
Definition at line 75 of file kis_experiment_paintop.h.
|
private |
Definition at line 69 of file kis_experiment_paintop.h.
|
private |
Definition at line 66 of file kis_experiment_paintop.h.
|
private |
Definition at line 65 of file kis_experiment_paintop.h.
|
private |
Definition at line 60 of file kis_experiment_paintop.h.
|
private |
Definition at line 61 of file kis_experiment_paintop.h.
|
private |
Definition at line 68 of file kis_experiment_paintop.h.
|
private |
Definition at line 63 of file kis_experiment_paintop.h.
|
private |
Definition at line 64 of file kis_experiment_paintop.h.
|
private |
Definition at line 58 of file kis_experiment_paintop.h.
|
private |
Definition at line 59 of file kis_experiment_paintop.h.
|
private |
Definition at line 78 of file kis_experiment_paintop.h.
|
private |
Definition at line 55 of file kis_experiment_paintop.h.