|
Krita Source Code Documentation
|
#include <kis_tile_data_wrapper.h>
Public Types | |
| enum | accessType { READ , WRITE } |
Public Member Functions | |
| quint8 * | data () const |
| KisTileDataWrapper (KisTiledDataManager *dm, qint32 x, qint32 y, enum KisTileDataWrapper::accessType type) | |
| qint32 | offset () const |
| KisTileSP & | tile () |
| virtual | ~KisTileDataWrapper () |
Private Attributes | |
| qint32 | m_offset |
| KisTileSP | m_tile |
| KisTileDataWrapper::accessType | m_type |
KisTileDataWrapper is a special object, that fetches the tile from the data manager according to the position, locks it and returns a pointer to the needed piece of data
Definition at line 16 of file kis_tile_data_wrapper.h.
| Enumerator | |
|---|---|
| READ | |
| WRITE | |
Definition at line 19 of file kis_tile_data_wrapper.h.
|
inline |
Fetches the tile which contains point (x, y) from the data manager dm with access type
Definition at line 28 of file kis_tile_data_wrapper.h.
References KisTiledDataManager::getTile(), KisTileData::HEIGHT, KisTile::lockForRead(), KisTile::lockForWrite(), m_offset, m_tile, m_type, KisTiledDataManager::pixelSize(), READ, tile(), KisTileData::WIDTH, WRITE, KisTiledDataManager::xToCol(), and KisTiledDataManager::yToRow().
|
inlinevirtual |
Definition at line 56 of file kis_tile_data_wrapper.h.
References m_tile, m_type, READ, KisTile::unlockForRead(), and KisTile::unlockForWrite().
|
inline |
Returns the pointer to the pixel, that was passed to the constructor. This points to the raw data of the tile, so you should think about the borders of the tile yourself. When (x,y) is the top-left corner of the tile, the pointer will lead to the beginning of the tile's chunk of memory.
Definition at line 90 of file kis_tile_data_wrapper.h.
References KisTile::data(), m_offset, and m_tile.
|
inline |
Returns the offset of the data in the tile's chunk of memory
Definition at line 70 of file kis_tile_data_wrapper.h.
References m_offset.
|
inline |
|
private |
Definition at line 99 of file kis_tile_data_wrapper.h.
|
private |
Definition at line 98 of file kis_tile_data_wrapper.h.
|
private |
Definition at line 100 of file kis_tile_data_wrapper.h.