LibreOffice Module libreofficekit (master) 1
Functions
tilebuffer.cxx File Reference
#include "tilebuffer.hxx"
#include <o3tl/unit_conversion.hxx>
Include dependency graph for tilebuffer.cxx:

Go to the source code of this file.

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 ()
 Gets GQuark identifying this tile buffer errors. More...
 

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().