|
Krita Source Code Documentation
|
#include <kis_colorsmudgeop.h>
Inheritance diagram for KisColorSmudgeOp:Public Member Functions | |
| KisColorSmudgeOp (const KisPaintOpSettingsSP settings, KisPainter *painter, KisNodeSP node, KisImageSP image) | |
| ~KisColorSmudgeOp () override | |
Public Member Functions inherited from KisBrushBasedPaintOp | |
| bool | canPaint () const override |
| Reimplemented, false if brush is 0. | |
| bool | checkSizeTooSmall (qreal scale) |
| KisSpacingInformation | effectiveSpacing (qreal scale) const |
| KisSpacingInformation | effectiveSpacing (qreal scale, qreal rotation, const KisAirbrushOptionData *airbrushOption, const KisSpacingOption *spacingOption, const KisPaintInformation &pi) const |
| KisSpacingInformation | effectiveSpacing (qreal scale, qreal rotation, const KisPaintInformation &pi) const |
| KisSpacingInformation | effectiveSpacing (qreal scale, qreal rotation, const KisSpacingOption &spacingOption, const KisPaintInformation &pi) const |
| KisBrushBasedPaintOp (const KisPaintOpSettingsSP settings, KisPainter *painter, KisBrushTextureFlags textureFlags=None) | |
| ~KisBrushBasedPaintOp () override | |
Public Member Functions inherited from KisPaintOp | |
| 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) |
| virtual void | paintLine (const KisPaintInformation &pi1, 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 KisInterstrokeDataFactory * | createInterstrokeDataFactory (const KisPaintOpSettingsSP settings, KisResourcesInterfaceSP resourcesInterface) |
Static Public Member Functions inherited from KisBrushBasedPaintOp | |
| static QList< KoResourceLoadResult > | prepareEmbeddedResources (const KisPaintOpSettingsSP settings, KisResourcesInterfaceSP resourcesInterface) |
| 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 () | |
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 |
Protected Attributes inherited from KisBrushBasedPaintOp | |
| KisBrushSP | m_brush |
| KisDabCache * | m_dabCache |
| KisMirrorOption | m_mirrorOption |
| KisPrecisionOption | m_precisionOption |
Definition at line 41 of file kis_colorsmudgeop.h.
| KisColorSmudgeOp::KisColorSmudgeOp | ( | const KisPaintOpSettingsSP | settings, |
| KisPainter * | painter, | ||
| KisNodeSP | node, | ||
| KisImageSP | image ) |
color transformation must be created after the color space of m_paintColor has been set up
Definition at line 48 of file kis_colorsmudgeop.cpp.
References ALPHAMASK, KisRotationOption::applyFanCornersInfo(), KoColor::colorSpace(), KoColor::convertedTo(), KoColorSpace::createColorTransformation(), KisHSVOption::createHueOption(), KisHSVOption::createSaturationOption(), KisHSVOption::createValueOption(), KisSharedPtr< T >::data(), KisPainter::gradient, GRADIENTMAP, IMAGESTAMP, KisSmudgeOverlayModeOptionData::isChecked, KisCurveOption::isChecked(), KIS_SAFE_ASSERT_RECOVER_NOOP, LIGHTNESSMAP, m_airbrushData, KisBrushBasedPaintOp::m_brush, m_gradient, m_hsvOptions, m_hsvTransform, m_overlayModeData, m_paintColor, m_paintThicknessOption, m_rotationOption, m_smudgeRateOption, m_strategy, KisPaintThicknessOption::mode(), KisSmudgeLengthOption::mode(), KisPainter::paintColor, KisPaintOp::painter, KisSmudgeOverlayModeOptionData::read(), KisAirbrushOptionData::read(), KisSmudgeLengthOption::smearAlpha(), and KisSmudgeLengthOption::useNewEngine().
|
override |
Definition at line 129 of file kis_colorsmudgeop.cpp.
References m_hsvOptions, and m_hsvTransform.
|
static |
Definition at line 242 of file kis_colorsmudgeop.cpp.
References KisBrushOptionProperties::brushApplication(), KisSharedPtr< T >::data(), KIS_SAFE_ASSERT_RECOVER_NOOP, and LIGHTNESSMAP.
|
overrideprotectedvirtual |
The implementation of painting of a dab and updating spacing. This does NOT need to update the timing information.
Disable handling of the subpixel precision. In the smudge op we should read from the aligned areas of the image, so having additional internal offsets, created by the subpixel precision, will worsen the quality (at least because QRectF(m_dstDabRect).center() will not point to the real center of the brush anymore). Of course, this only really matters with smearing_mode (bug:327235), and you only notice the lack of subpixel precision in the dulling methods.
Save the center of the current dab to know where to read the data during the next pass. We do not save scatteredPos here, because it may differ slightly from the real center of the brush (due to rounding effects), which will result in a really weird quality.
Implements KisPaintOp.
Definition at line 135 of file kis_colorsmudgeop.cpp.
References KisPainter::addDirtyRects(), KisPaintThicknessOption::apply(), KisRotationOption::apply(), KisStandardOption< Data >::apply(), KisScatterOption::apply(), KisOpacityOption::apply(), KisGradientOption::apply(), KisHSVOption::apply(), KisBrushBasedPaintOp::checkSizeTooSmall(), KisCurveOption::computeSizeLikeValue(), KoColor::data(), KisDabCacheBase::disableSubpixelPrecision(), KisBrushBasedPaintOp::effectiveSpacing(), KisCurveOption::isChecked(), KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, KisLodTransformBase::lodToScale(), m_airbrushData, KisBrushBasedPaintOp::m_brush, m_colorRateOption, KisBrushBasedPaintOp::m_dabCache, m_dstDabRect, m_firstRun, m_gradient, m_gradientOption, m_hsvOptions, m_hsvTransform, m_lastPaintPos, m_opacityOption, m_paintColor, m_paintThicknessOption, m_ratioOption, m_rotationOption, m_scatterOption, m_sizeOption, m_smudgeRadiusOption, m_smudgeRateOption, m_spacingOption, m_strategy, KisSmudgeLengthOption::mode(), KisPaintOp::painter, KisCurveOption::strengthValue(), and KoColorTransformation::transform().
|
overrideprotectedvirtual |
Implementation of a spacing update
Implements KisPaintOp.
Definition at line 230 of file kis_colorsmudgeop.cpp.
References KisRotationOption::apply(), KisStandardOption< Data >::apply(), KisBrushBasedPaintOp::effectiveSpacing(), KisLodTransformBase::lodToScale(), m_airbrushData, m_rotationOption, m_sizeOption, m_spacingOption, 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 237 of file kis_colorsmudgeop.cpp.
References KisPaintOpPluginUtils::effectiveTiming(), m_airbrushData, and m_rateOption.
|
private |
Definition at line 74 of file kis_colorsmudgeop.h.
|
private |
Definition at line 70 of file kis_colorsmudgeop.h.
|
private |
Definition at line 77 of file kis_colorsmudgeop.h.
|
private |
Definition at line 56 of file kis_colorsmudgeop.h.
|
private |
Definition at line 59 of file kis_colorsmudgeop.h.
|
private |
Definition at line 68 of file kis_colorsmudgeop.h.
|
private |
Definition at line 73 of file kis_colorsmudgeop.h.
|
private |
Definition at line 80 of file kis_colorsmudgeop.h.
|
private |
Definition at line 78 of file kis_colorsmudgeop.h.
|
private |
Definition at line 62 of file kis_colorsmudgeop.h.
|
private |
Definition at line 75 of file kis_colorsmudgeop.h.
|
private |
Definition at line 58 of file kis_colorsmudgeop.h.
|
private |
Definition at line 67 of file kis_colorsmudgeop.h.
|
private |
Definition at line 64 of file kis_colorsmudgeop.h.
|
private |
Definition at line 61 of file kis_colorsmudgeop.h.
|
private |
Definition at line 65 of file kis_colorsmudgeop.h.
|
private |
Definition at line 66 of file kis_colorsmudgeop.h.
|
private |
Definition at line 60 of file kis_colorsmudgeop.h.
|
private |
Definition at line 71 of file kis_colorsmudgeop.h.
|
private |
Definition at line 69 of file kis_colorsmudgeop.h.
|
private |
Definition at line 63 of file kis_colorsmudgeop.h.
|
private |
Definition at line 81 of file kis_colorsmudgeop.h.