|
Krita Source Code Documentation
|
#include <kis_sketch_paintop.h>
Inheritance diagram for KisSketchPaintOp:Public Member Functions | |
| KisSketchPaintOp (const KisPaintOpSettingsSP settings, KisPainter *painter, KisNodeSP node, KisImageSP image) | |
| void | paintLine (const KisPaintInformation &pi1, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance) override |
| ~KisSketchPaintOp () 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 () |
Static Public Member Functions | |
| static QList< KoResourceLoadResult > | prepareLinkedResources (const KisPaintOpSettingsSP settings, KisResourcesInterfaceSP resourcesInterface) |
Static Public Member Functions inherited from KisPaintOp | |
| static void | splitCoordinate (qreal coordinate, qint32 *whole, qreal *fraction) |
Protected Member Functions | |
| KisSpacingInformation | paintAt (const KisPaintInformation &info) override |
| KisSpacingInformation | updateSpacingImpl (const KisPaintInformation &info) const override |
| KisTimingInformation | updateTimingImpl (const KisPaintInformation &info) const override |
Protected Member Functions inherited from KisPaintOp | |
| KisFixedPaintDeviceSP | cachedDab () |
| KisFixedPaintDeviceSP | cachedDab (const KoColorSpace *cs) |
| KisPainter * | painter () const |
| KisPaintDeviceSP | source () const |
Protected Member Functions inherited from KisShared | |
| KisShared () | |
| ~KisShared () | |
Private Member Functions | |
| void | doPaintLine (const KisPaintInformation &pi1, const KisPaintInformation &pi2) |
| void | drawConnection (const QPointF &start, const QPointF &end, double lineWidth) |
| void | updateBrushMask (const KisPaintInformation &info, qreal scale, qreal rotation) |
Additional Inherited Members | |
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 27 of file kis_sketch_paintop.h.
| KisSketchPaintOp::KisSketchPaintOp | ( | const KisPaintOpSettingsSP | settings, |
| KisPainter * | painter, | ||
| KisNodeSP | node, | ||
| KisImageSP | image ) |
Definition at line 54 of file kis_sketch_paintop.cpp.
References KisBrushOptionProperties::brush(), KisSharedPtr< T >::data(), m_airbrushOption, m_brush, m_brushOption, m_count, m_dabCache, m_painter, m_sketchProperties, KisAirbrushOptionData::read(), KisSketchOpOptionData::read(), and KisPaintopPropertiesCanvasResourcesBase::readOptionSetting().
|
override |
Definition at line 78 of file kis_sketch_paintop.cpp.
References m_dabCache, and m_painter.
|
private |
Since the order of calculation of function parameters is not defined by C++ standard, we should generate values in an external code snippet which has a definite order of execution.
Definition at line 138 of file kis_sketch_paintop.cpp.
References KisRotationOption::apply(), KisStandardOption< Data >::apply(), KisOpacityOption::apply(), KisPainter::bitBlt(), KisFixedPaintDevice::bounds(), KisPaintDevice::clear(), KisFixedPaintDevice::colorSpace(), KisPaintDevice::colorSpace(), KisPaintDevice::createCompositionSourceDevice(), KisFixedPaintDevice::data(), distance(), KisSketchOpOptionData::distanceDensity, KisSketchOpOptionData::distanceOpacity, drawConnection(), KisPaintDevice::extent(), KoColor::fromQColor(), KisRandomSource::generateNormalized(), KisSketchOpOptionData::lineWidth, KisLodTransformBase::lodToScale(), m_brush, m_brushBoundingBox, m_count, m_dab, m_densityOption, m_hotSpot, m_lineWidthOption, m_maskDab, m_offsetScaleOption, m_opacityOption, m_painter, m_points, m_radius, m_rotationOption, m_sizeOption, m_sketchProperties, KisSketchOpOptionData::magnetify, KisSketchOpOptionData::makeConnection, KisSketchOpOptionData::offset, OPACITY_OPAQUE_F, KoColorSpace::opacityU8(), KisPainter::paintColor, KisPaintOp::painter, KisFixedPaintDevice::pixelSize(), KisPaintInformation::pos(), KisSketchOpOptionData::probability, r1, r2, r3, KisSketchOpOptionData::randomOpacity, KisSketchOpOptionData::randomRGB, KisPaintInformation::randomSource(), KisPainter::renderMirrorMask(), KisPainter::setOpacityF(), KisPainter::setPaintColor(), KisSketchOpOptionData::simpleMode, KisPaintOp::source(), KoColor::toQColor(), and updateBrushMask().
|
private |
Definition at line 90 of file kis_sketch_paintop.cpp.
References KisSketchOpOptionData::antiAliasing, KisPainter::drawDDALine(), KisPainter::drawLine(), KisPainter::drawWuLine(), m_painter, and m_sketchProperties.
|
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 310 of file kis_sketch_paintop.cpp.
References doPaintLine(), and 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.
Reimplemented from KisPaintOp.
Definition at line 126 of file kis_sketch_paintop.cpp.
References doPaintLine(), KisPaintOp::paintLine(), and KisPaintInformation::pos().
|
static |
Definition at line 84 of file kis_sketch_paintop.cpp.
References KisPaintopPropertiesCanvasResourcesBase::prepareLinkedResources().
|
private |
Definition at line 111 of file kis_sketch_paintop.cpp.
References KisPaintDevice::colorSpace(), KisDabCache::fetchDab(), m_brushBoundingBox, m_dab, m_dabCache, m_hotSpot, m_maskDab, KisPaintOp::painter, and KisPaintInformation::pos().
|
overrideprotectedvirtual |
Implementation of a spacing update
Implements KisPaintOp.
Definition at line 316 of file kis_sketch_paintop.cpp.
References KisPaintOpPluginUtils::effectiveSpacing(), KisLodTransformBase::lodToScale(), m_airbrushOption, and KisPaintOp::painter.
|
overrideprotectedvirtual |
Implementation of a timing update. The default implementation always disables timing. This is suitable for paintops that do not support airbrushing.
Reimplemented from KisPaintOp.
Definition at line 323 of file kis_sketch_paintop.cpp.
References KisPaintOpPluginUtils::effectiveTiming(), m_airbrushOption, and m_rateOption.
|
private |
Definition at line 65 of file kis_sketch_paintop.h.
|
private |
Definition at line 73 of file kis_sketch_paintop.h.
|
private |
Definition at line 52 of file kis_sketch_paintop.h.
|
private |
Definition at line 67 of file kis_sketch_paintop.h.
|
private |
Definition at line 71 of file kis_sketch_paintop.h.
|
private |
Definition at line 48 of file kis_sketch_paintop.h.
|
private |
Definition at line 74 of file kis_sketch_paintop.h.
|
private |
Definition at line 62 of file kis_sketch_paintop.h.
|
private |
Definition at line 53 of file kis_sketch_paintop.h.
|
private |
Definition at line 63 of file kis_sketch_paintop.h.
|
private |
Definition at line 51 of file kis_sketch_paintop.h.
|
private |
Definition at line 64 of file kis_sketch_paintop.h.
|
private |
Definition at line 58 of file kis_sketch_paintop.h.
|
private |
Definition at line 72 of file kis_sketch_paintop.h.
|
private |
Definition at line 70 of file kis_sketch_paintop.h.
|
private |
Definition at line 56 of file kis_sketch_paintop.h.
|
private |
Definition at line 61 of file kis_sketch_paintop.h.
|
private |
Definition at line 60 of file kis_sketch_paintop.h.
|
private |
Definition at line 59 of file kis_sketch_paintop.h.
|
private |
Definition at line 68 of file kis_sketch_paintop.h.