File indexing completed on 2024-12-22 04:16:03

0001 /*
0002  *  SPDX-FileCopyrightText: 2021 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KRITA_KISCOLORSMUDGESTRATEGYMASKLEGACY_H
0008 #define KRITA_KISCOLORSMUDGESTRATEGYMASKLEGACY_H
0009 
0010 #include "KisColorSmudgeStrategyMask.h"
0011 
0012 
0013 class KisColorSmudgeStrategyMaskLegacy : public KisColorSmudgeStrategyMask
0014 {
0015 public:
0016     KisColorSmudgeStrategyMaskLegacy(KisPainter *painter,
0017                                      KisImageSP image,
0018                                      bool smearAlpha,
0019                                      bool useDullingMode,
0020                                      bool useOverlayMode);
0021 
0022     void sampleDullingColor(const QRect &srcRect, qreal sampleRadiusValue, KisColorSmudgeSourceSP sourceDevice,
0023                             KisFixedPaintDeviceSP tempFixedDevice, KisFixedPaintDeviceSP maskDab,
0024                             KoColor *resultColor) override;
0025     QString smearCompositeOp(bool smearAlpha) const override;
0026     QString finalCompositeOp(bool smearAlpha) const override;
0027     quint8 finalPainterOpacity(qreal opacity, qreal smudgeRateValue) override;
0028     quint8 colorRateOpacity(qreal opacity, qreal smudgeRateValue, qreal colorRateValue, qreal maxPossibleSmudgeRateValue) override;
0029     quint8 dullingRateOpacity(qreal opacity, qreal smudgeRateValue) override;
0030     quint8 smearRateOpacity(qreal opacity, qreal smudgeRateValue) override;
0031 };
0032 
0033 
0034 #endif //KRITA_KISCOLORSMUDGESTRATEGYMASKLEGACY_H