10#ifndef INCLUDED_TILEBUFFER_HXX
11#define INCLUDED_TILEBUFFER_HXX
19#define LOK_TILEBUFFER_ERROR (LOKTileBufferErrorQuark())
99 cairo_surface_destroy(pSurface);
119 Tile&
getTile(
int x,
int y, GTask* task, GThreadPool* pool);
144 void setInvalid(
int x,
int y,
float zoom, GTask* task, GThreadPool*);
276 static void destroy(
void* pMemory);
struct _cairo_surface cairo_surface_t
This class represents the tile buffer which is responsible for managing, reusing and caching all the ...
void setInvalid(int x, int y, float zoom, GTask *task, GThreadPool *)
Marks the tile as invalid.
void setTile(int x, int y, cairo_surface_t *surface)
void resetAllTiles()
Destroys all the tiles in the tile buffer; also frees the memory allocated for all the Tile objects.
bool hasValidTile(int x, int y)
Returns true if a valid tile exists at this location.
int m_nWidth
Width of the current tile buffer (number of columns)
Tile m_DummyTile
Dummy tile.
Tile & getTile(int x, int y, GTask *task, GThreadPool *pool)
Gets the underlying Tile object for given position.
TileBuffer(int columns=0, int scale=1)
std::map< int, Tile > m_mTiles
Stores all the tiles cached by this tile buffer.
This class represents a single tile in the tile buffer.
cairo_surface_t * getBuffer()
Function to get the pointer to enclosing cairo_surface_t.
cairo_surface_t * m_pBuffer
Pixel buffer data for this tile.
void setSurface(cairo_surface_t *)
Used to set the pixel buffer of this object.
bool valid
Tells if this tile is valid or not.
A struct that we use to store the data about the LOK call.
int m_nSetGraphicSelectionX
int m_nPostMouseEventButton
static void destroy(void *pMemory)
Wrapper around delete to help GLib.
gboolean m_bEdit
set_edit parameter
LOEvent(int type)
Constructor to instantiate an object of type type.
int m_nPartMode
set_partmode parameter
int m_nPart
set_part parameter
TileBuffer * m_pTileBuffer
int m_nSetGraphicSelectionType
int m_nSetGraphicSelectionY
int m_nPostMouseEventModifier
int m_nPostMouseEventType
int m_nType
To identify the type of LOK call.
gboolean m_bNotifyWhenFinished
int m_nPostMouseEventCount
const int nTileSizePixels
GQuark LOKTileBufferErrorQuark(void)
Gets GQuark identifying this tile buffer errors.
@ LOK_SET_GRAPHIC_SELECTION
float pixelToTwip(float fInput, float zoom)
Converts the pixel value to zoom independent twip value.
float twipToPixel(float fInput, float zoom)
Converts the zoom independent twip value pixel value.