File indexing completed on 2024-05-12 15:58:09
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2010 Cyrille Berger <cberger@cberger.net> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef _KISBASEACCESSOR_H_ 0008 #define _KISBASEACCESSOR_H_ 0009 0010 #include <kritaimage_export.h> 0011 #include <kis_shared.h> 0012 0013 class KRITAIMAGE_EXPORT KisBaseConstAccessor : public KisShared 0014 { 0015 Q_DISABLE_COPY(KisBaseConstAccessor) 0016 public: 0017 KisBaseConstAccessor() {} 0018 virtual ~KisBaseConstAccessor(); 0019 /** 0020 * @return a pointer to the pixel data as it was at the moment of the last memento creation. 0021 */ 0022 virtual const quint8 * oldRawData() const = 0; 0023 0024 /** 0025 * @return a pointer to the most actual pixel data, 0026 * this points to te same data as rawData() method of 0027 * a writable accessor 0028 */ 0029 virtual const quint8 * rawDataConst() const = 0; 0030 0031 virtual qint32 x() const = 0; 0032 virtual qint32 y() const = 0; 0033 }; 0034 0035 class KRITAIMAGE_EXPORT KisBaseAccessor 0036 { 0037 Q_DISABLE_COPY(KisBaseAccessor) 0038 public: 0039 KisBaseAccessor() {} 0040 virtual ~KisBaseAccessor(); 0041 /** 0042 * @return a pointer to the pixel data. Do NOT interpret the data - leave that to a colorspace 0043 */ 0044 virtual quint8 * rawData() = 0; 0045 }; 0046 0047 #endif