File indexing completed on 2024-06-16 04:12:12
0001 /* 0002 * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #ifndef KISLAYERSTYLEKNOCKOUTBLOWER_H 0007 #define KISLAYERSTYLEKNOCKOUTBLOWER_H 0008 0009 #include "kis_selection.h" 0010 #include <QReadWriteLock> 0011 0012 class KisPainter; 0013 0014 0015 class KRITAIMAGE_EXPORT KisLayerStyleKnockoutBlower 0016 { 0017 public: 0018 KisLayerStyleKnockoutBlower(); 0019 KisLayerStyleKnockoutBlower(const KisLayerStyleKnockoutBlower &rhs); 0020 0021 KisSelectionSP knockoutSelectionLazy(); 0022 0023 void setKnockoutSelection(KisSelectionSP selection); 0024 void resetKnockoutSelection(); 0025 0026 0027 void apply(KisPainter *painter, KisPaintDeviceSP mergedStyle, const QRect &rect) const; 0028 bool isEmpty() const; 0029 0030 private: 0031 mutable QReadWriteLock m_lock; 0032 KisSelectionSP m_knockoutSelection; 0033 }; 0034 0035 #endif // KISLAYERSTYLEKNOCKOUTBLOWER_H