LibreOffice Module libreofficekit (master) 1
Classes | Macros | Enumerations | Functions | Variables
tilebuffer.hxx File Reference
#include <cairo.h>
#include <gio/gio.h>
#include <glib.h>
#include <map>
Include dependency graph for tilebuffer.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Tile
 This class represents a single tile in the tile buffer. More...
 
class  TileBuffer
 This class represents the tile buffer which is responsible for managing, reusing and caching all the already rendered tiles. More...
 
struct  LOEvent
 A struct that we use to store the data about the LOK call. More...
 

Macros

#define LOK_TILEBUFFER_ERROR   (LOKTileBufferErrorQuark())
 

Enumerations

enum  {
  LOK_LOAD_DOC ,
  LOK_POST_COMMAND ,
  LOK_SET_EDIT ,
  LOK_SET_PARTMODE ,
  LOK_SET_PART ,
  LOK_POST_KEY ,
  LOK_PAINT_TILE ,
  LOK_POST_MOUSE_EVENT ,
  LOK_SET_GRAPHIC_SELECTION ,
  LOK_SET_CLIENT_ZOOM
}
 
enum  {
  LOK_TILEBUFFER_CHANGED ,
  LOK_TILEBUFFER_MEMORY
}
 

Functions

float pixelToTwip (float fInput, float zoom)
 Converts the pixel value to zoom independent twip value. More...
 
float twipToPixel (float fInput, float zoom)
 Converts the zoom independent twip value pixel value. More...
 
GQuark LOKTileBufferErrorQuark (void)
 Gets GQuark identifying this tile buffer errors. More...
 

Variables

const int nTileSizePixels = 256
 

Macro Definition Documentation

◆ LOK_TILEBUFFER_ERROR

#define LOK_TILEBUFFER_ERROR   (LOKTileBufferErrorQuark())

Definition at line 19 of file tilebuffer.hxx.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LOK_LOAD_DOC 
LOK_POST_COMMAND 
LOK_SET_EDIT 
LOK_SET_PARTMODE 
LOK_SET_PART 
LOK_POST_KEY 
LOK_PAINT_TILE 
LOK_POST_MOUSE_EVENT 
LOK_SET_GRAPHIC_SELECTION 
LOK_SET_CLIENT_ZOOM 

Definition at line 155 of file tilebuffer.hxx.

◆ anonymous enum

anonymous enum
Enumerator
LOK_TILEBUFFER_CHANGED 
LOK_TILEBUFFER_MEMORY 

Definition at line 169 of file tilebuffer.hxx.

Function Documentation

◆ LOKTileBufferErrorQuark()

GQuark LOKTileBufferErrorQuark ( void  )

Gets GQuark identifying this tile buffer errors.

Definition at line 137 of file tilebuffer.cxx.

◆ pixelToTwip()

float pixelToTwip ( float  fInput,
float  zoom 
)

Converts the pixel value to zoom independent twip value.

Parameters
fInputvalue to convert
zoomthe current zoom level
Returns
the pixels value corresponding to given twip value

Definition at line 20 of file tilebuffer.cxx.

References o3tl::px, and o3tl::toTwips().

Referenced by doSearch(), handleGraphicSelectionOnButtonPress(), handleGraphicSelectionOnButtonRelease(), lok_doc_view_pixel_to_twip(), lok_doc_view_signal_button(), lok_doc_view_signal_motion(), paintTileInThread(), renderDocument(), and updateClientZoom().

◆ twipToPixel()

float twipToPixel ( float  fInput,
float  zoom 
)

Converts the zoom independent twip value pixel value.

Parameters
fInputvalue to convert
zoomthe current zoom level
Returns
the twip value corresponding to given pixel value

Definition at line 25 of file tilebuffer.cxx.

References o3tl::convert(), o3tl::px, and o3tl::twip.

Referenced by lok_doc_view_set_zoom(), lok_doc_view_twip_to_pixel(), refreshSize(), renderDocument(), renderGraphicHandle(), renderHandle(), renderOverlay(), and setTilesInvalid().

Variable Documentation

◆ nTileSizePixels

const int nTileSizePixels = 256