|
Krita Source Code Documentation
|
#include <kis_hatching_paintop.h>
Inheritance diagram for KisHatchingPaintOp:Public Member Functions | |
| KisHatchingPaintOp (const KisPaintOpSettingsSP settings, KisPainter *painter, KisNodeSP node, KisImageSP image) | |
| double | spinAngle (double spin) |
| ~KisHatchingPaintOp () 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 () |
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 () | |
Additional Inherited Members | |
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) |
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 30 of file kis_hatching_paintop.h.
| KisHatchingPaintOp::KisHatchingPaintOp | ( | const KisPaintOpSettingsSP | settings, |
| KisPainter * | painter, | ||
| KisNodeSP | node, | ||
| KisImageSP | image ) |
Definition at line 35 of file kis_hatching_paintop.cpp.
References KisSharedPtr< T >::data(), m_hatchingBrush, m_hatchingOptions, m_hatchingPreferences, m_settings, KisHatchingOptionsData::read(), and KisHatchingPreferencesData::read().
|
override |
Definition at line 55 of file kis_hatching_paintop.cpp.
References m_hatchingBrush.
|
overrideprotectedvirtual |
Paint a hatched dab around the mouse cursor according to sensor settings and user preferences.
Implements KisPaintOp.
Definition at line 60 of file kis_hatching_paintop.cpp.
References KoColorSpaceRegistry::alpha8(), KisHatchingOptionsData::angle, KisHatchingPaintOpSettings::anglesensorvalue, KisStandardOption< Data >::apply(), KisOpacityOption::apply(), KisPainter::backgroundColor, KisPainter::bitBltWithFixedSelection(), KisFixedPaintDevice::bounds(), KisPaintDevice::clear(), KisPaintDevice::createCompositionSourceDevice(), KisHatchingPaintOpSettings::crosshatchingsensorvalue, KisHatchingOptionsData::crosshatchingStyle, KoColor::data(), KisPainter::device, KisBrushBasedPaintOp::effectiveSpacing(), KisDabCache::fetchDab(), KisPaintDevice::fill(), HatchingBrush::hatch(), KoColorSpaceRegistry::instance(), KisCurveOption::isChecked(), KIS_ASSERT_RECOVER_NOOP, KisLodTransformBase::lodToScale(), m_angleOption, KisBrushBasedPaintOp::m_brush, m_crosshatchingOption, KisBrushBasedPaintOp::m_dabCache, m_hatchedDab, m_hatchingBrush, m_hatchingOptions, m_hatchingPreferences, m_opacityOption, m_separationOption, m_settings, m_sizeOption, m_thicknessOption, MinusThenPlus, MoirePattern, KisDabCache::needSeparateOriginal(), KisPaintOp::painter, Perpendicular, PlusThenMinus, KisPaintInformation::pos(), KisPainter::renderMirrorMaskSafe(), KisHatchingPaintOpSettings::separationsensorvalue, KisPaintOp::source(), spinAngle(), KisHatchingPaintOpSettings::thicknesssensorvalue, and KisHatchingPreferencesData::useOpaqueBackground.
| double KisHatchingPaintOp::spinAngle | ( | double | spin | ) |
Returns a number between -90 and 90, and corresponds to the angle that results from adding angle 'spin' to 'm_hatchingOptions.angle', corrected to coincide with the way the GUI operates.
Definition at line 179 of file kis_hatching_paintop.cpp.
References KisHatchingOptionsData::angle, and m_hatchingOptions.
|
overrideprotectedvirtual |
Implementation of a spacing update
Implements KisPaintOp.
Definition at line 173 of file kis_hatching_paintop.cpp.
References KisStandardOption< Data >::apply(), KisBrushBasedPaintOp::effectiveSpacing(), KisLodTransformBase::lodToScale(), m_sizeOption, and KisPaintOp::painter.
|
private |
Curve to control the hatching angle according to user preferences set in the GUI
Definition at line 70 of file kis_hatching_paintop.h.
|
private |
Curve to control the intensity of crosshatching according to user preferences set in the GUI
Definition at line 76 of file kis_hatching_paintop.h.
|
private |
PaintDevice that will be filled with a single pass of hatching by HatchingBrush::hatch
Definition at line 64 of file kis_hatching_paintop.h.
|
private |
Definition at line 58 of file kis_hatching_paintop.h.
|
private |
Definition at line 56 of file kis_hatching_paintop.h.
|
private |
Definition at line 57 of file kis_hatching_paintop.h.
|
private |
Curve to control the opacity of the entire dab with device input
Definition at line 94 of file kis_hatching_paintop.h.
|
private |
Curve to control the dynamics of separation with device input
Definition at line 82 of file kis_hatching_paintop.h.
|
private |
Definition at line 55 of file kis_hatching_paintop.h.
|
private |
Curve to control the size of the entire dab with device input
Definition at line 100 of file kis_hatching_paintop.h.
|
private |
Curve to control the thickness of the hatching lines with device input
Definition at line 88 of file kis_hatching_paintop.h.