File indexing completed on 2024-05-12 15:58:48
0001 /* 0002 * SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef __KIS_WRAPPED_RANDOM_ACCESSOR_H 0008 #define __KIS_WRAPPED_RANDOM_ACCESSOR_H 0009 0010 #include "tiles3/kis_random_accessor.h" 0011 0012 0013 class KisWrappedRandomAccessor : public KisRandomAccessor2 0014 { 0015 public: 0016 KisWrappedRandomAccessor(KisTiledDataManager *ktm, 0017 qint32 offsetX, qint32 offsetY, 0018 bool writable, 0019 KisIteratorCompleteListener *completeListener, 0020 const QRect &wrapRect); 0021 0022 void moveTo(qint32 x, qint32 y) override; 0023 qint32 numContiguousColumns(qint32 x) const override; 0024 qint32 numContiguousRows(qint32 y) const override; 0025 qint32 rowStride(qint32 x, qint32 y) const override; 0026 0027 qint32 x() const override; 0028 qint32 y() const override; 0029 0030 private: 0031 QRect m_wrapRect; 0032 QPoint m_currentPos; 0033 }; 0034 0035 #endif /* __KIS_WRAPPED_RANDOM_ACCESSOR_H */