Changeset View
Changeset View
Standalone View
Standalone View
plugins/paintops/colorsmudge/kis_colorsmudgeop.h
Show All 28 Lines | |||||
29 | #include <kis_pressure_rotation_option.h> | 29 | #include <kis_pressure_rotation_option.h> | ||
30 | #include <kis_pressure_scatter_option.h> | 30 | #include <kis_pressure_scatter_option.h> | ||
31 | #include <kis_pressure_gradient_option.h> | 31 | #include <kis_pressure_gradient_option.h> | ||
32 | 32 | | |||
33 | #include "kis_overlay_mode_option.h" | 33 | #include "kis_overlay_mode_option.h" | ||
34 | #include "kis_rate_option.h" | 34 | #include "kis_rate_option.h" | ||
35 | #include "kis_smudge_option.h" | 35 | #include "kis_smudge_option.h" | ||
36 | #include "kis_smudge_radius_option.h" | 36 | #include "kis_smudge_radius_option.h" | ||
37 | #include "KisPrecisePaintDeviceWrapper.h" | ||||
37 | 38 | | |||
38 | class QPointF; | 39 | class QPointF; | ||
39 | class KoAbstractGradient; | 40 | class KoAbstractGradient; | ||
40 | class KisBrushBasedPaintOpSettings; | 41 | class KisBrushBasedPaintOpSettings; | ||
41 | class KisPainter; | 42 | class KisPainter; | ||
43 | class KoColorSpace; | ||||
42 | 44 | | |||
43 | class KisColorSmudgeOp: public KisBrushBasedPaintOp | 45 | class KisColorSmudgeOp: public KisBrushBasedPaintOp | ||
44 | { | 46 | { | ||
45 | public: | 47 | public: | ||
46 | KisColorSmudgeOp(const KisPaintOpSettingsSP settings, KisPainter* painter, KisNodeSP node, KisImageSP image); | 48 | KisColorSmudgeOp(const KisPaintOpSettingsSP settings, KisPainter* painter, KisNodeSP node, KisImageSP image); | ||
47 | ~KisColorSmudgeOp() override; | 49 | ~KisColorSmudgeOp() override; | ||
48 | 50 | | |||
49 | protected: | 51 | protected: | ||
50 | KisSpacingInformation paintAt(const KisPaintInformation& info) override; | 52 | KisSpacingInformation paintAt(const KisPaintInformation& info) override; | ||
51 | 53 | | |||
52 | KisSpacingInformation updateSpacingImpl(const KisPaintInformation &info) const override; | 54 | KisSpacingInformation updateSpacingImpl(const KisPaintInformation &info) const override; | ||
53 | 55 | | |||
54 | private: | 56 | private: | ||
55 | // Sets the m_maskDab _and m_maskDabRect | 57 | // Sets the m_maskDab _and m_maskDabRect | ||
56 | void updateMask(const KisPaintInformation& info, double scale, double rotation, const QPointF &cursorPoint); | 58 | void updateMask(const KisPaintInformation& info, double scale, double rotation, const QPointF &cursorPoint); | ||
57 | 59 | | |||
58 | inline void getTopLeftAligned(const QPointF &pos, const QPointF &hotSpot, qint32 *x, qint32 *y); | 60 | inline void getTopLeftAligned(const QPointF &pos, const QPointF &hotSpot, qint32 *x, qint32 *y); | ||
59 | 61 | | |||
60 | private: | 62 | private: | ||
61 | bool m_firstRun; | 63 | bool m_firstRun; | ||
62 | KisImageWSP m_image; | 64 | KisImageWSP m_image; | ||
65 | KisPrecisePaintDeviceWrapper m_preciseWrapper; | ||||
66 | KoColor m_paintColor; | ||||
63 | KisPaintDeviceSP m_tempDev; | 67 | KisPaintDeviceSP m_tempDev; | ||
64 | KisPainter* m_backgroundPainter; | 68 | QScopedPointer<KisPainter> m_backgroundPainter; | ||
65 | KisPainter* m_smudgePainter; | 69 | QScopedPointer<KisPainter> m_smudgePainter; | ||
66 | KisPainter* m_colorRatePainter; | 70 | QScopedPointer<KisPainter> m_colorRatePainter; | ||
71 | QScopedPointer<KisPainter> m_finalPainter; | ||||
67 | const KoAbstractGradient* m_gradient; | 72 | const KoAbstractGradient* m_gradient; | ||
68 | KisPressureSizeOption m_sizeOption; | 73 | KisPressureSizeOption m_sizeOption; | ||
69 | KisPressureOpacityOption m_opacityOption; | 74 | KisPressureOpacityOption m_opacityOption; | ||
70 | KisPressureSpacingOption m_spacingOption; | 75 | KisPressureSpacingOption m_spacingOption; | ||
71 | KisSmudgeOption m_smudgeRateOption; | 76 | KisSmudgeOption m_smudgeRateOption; | ||
72 | KisRateOption m_colorRateOption; | 77 | KisRateOption m_colorRateOption; | ||
73 | KisSmudgeRadiusOption m_smudgeRadiusOption; | 78 | KisSmudgeRadiusOption m_smudgeRadiusOption; | ||
74 | KisOverlayModeOption m_overlayModeOption; | 79 | KisOverlayModeOption m_overlayModeOption; | ||
75 | KisPressureRotationOption m_rotationOption; | 80 | KisPressureRotationOption m_rotationOption; | ||
76 | KisPressureScatterOption m_scatterOption; | 81 | KisPressureScatterOption m_scatterOption; | ||
77 | KisPressureGradientOption m_gradientOption; | 82 | KisPressureGradientOption m_gradientOption; | ||
78 | QRect m_dstDabRect; | 83 | QRect m_dstDabRect; | ||
79 | KisFixedPaintDeviceSP m_maskDab; | 84 | KisFixedPaintDeviceSP m_maskDab; | ||
80 | QPointF m_lastPaintPos; | 85 | QPointF m_lastPaintPos; | ||
86 | | ||||
87 | const KoCompositeOp *m_preciseColorRateCompositeOp = 0; | ||||
81 | }; | 88 | }; | ||
82 | 89 | | |||
83 | #endif // _KIS_COLORSMUDGEOP_H_ | 90 | #endif // _KIS_COLORSMUDGEOP_H_ |