File indexing completed on 2024-05-12 15:58:37
0001 /* 0002 * SPDX-FileCopyrightText: 2007 Cyrille Berger <cberger@cberger.net> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef _KIS_PROCESSING_INFORMATION_H_ 0008 #define _KIS_PROCESSING_INFORMATION_H_ 0009 0010 #include "kis_types.h" 0011 0012 #include "kritaimage_export.h" 0013 0014 0015 /** 0016 * This class is used in KisFilter to contain information needed to apply a filter 0017 * on a paint device. 0018 * This one have only a const paint device and holds information about the source. 0019 */ 0020 class KRITAIMAGE_EXPORT KisConstProcessingInformation 0021 { 0022 public: 0023 KisConstProcessingInformation(const KisPaintDeviceSP device, const QPoint& topLeft, const KisSelectionSP selection); 0024 KisConstProcessingInformation(const KisConstProcessingInformation& _rhs); 0025 KisConstProcessingInformation& operator=(const KisConstProcessingInformation& _rhs); 0026 ~KisConstProcessingInformation(); 0027 /** 0028 * @return the paint device 0029 */ 0030 const KisPaintDeviceSP paintDevice() const; 0031 0032 /** 0033 * @return the active selection 0034 */ 0035 const KisSelectionSP selection() const; 0036 /** 0037 * @return the top left pixel that need to process 0038 */ 0039 const QPoint& topLeft() const; 0040 private: 0041 struct Private; 0042 Private* const d; 0043 }; 0044 0045 /** 0046 * This class is used in KisFilter to contain information needed to apply a filter 0047 * on a paint device. 0048 * This one can have a non const paint device and holds information about the destination. 0049 */ 0050 class KRITAIMAGE_EXPORT KisProcessingInformation : public KisConstProcessingInformation 0051 { 0052 public: 0053 KisProcessingInformation(KisPaintDeviceSP device, const QPoint& topLeft, const KisSelectionSP selection); 0054 KisProcessingInformation(const KisProcessingInformation& _rhs); 0055 KisProcessingInformation& operator=(const KisProcessingInformation& _rhs); 0056 ~KisProcessingInformation(); 0057 /** 0058 * @return the paint device 0059 */ 0060 KisPaintDeviceSP paintDevice(); 0061 private: 0062 struct Private; 0063 Private* const d; 0064 }; 0065 0066 #endif