LibreOffice Module basegfx (master) 1
|
Functions | |
static sal_uInt16 | roundMultiple (sal_uInt16 nCurrent, int nMultiple) |
Round a value against a specified multiple. More... | |
static sal_uInt16 | roundZoom (double nCurrent) |
Convert geometric progression results into more common values by rounding them against certain multiples depending on the size. More... | |
static sal_uInt16 | enforceStep (sal_uInt16 nCurrent, sal_uInt16 nPrevious, unsigned int nStep) |
Make sure that a certain step isn't skipped during the zooming progress. More... | |
sal_uInt16 | zoomIn (sal_uInt16 nCurrent) |
Increasing the zoom level. More... | |
sal_uInt16 | zoomOut (sal_uInt16 nCurrent) |
Decreasing the zoom level. More... | |
Variables | |
const double | ZOOM_FACTOR = 1.12246205 |
2^(1/6) as the default step More... | |
|
static |
Make sure that a certain step isn't skipped during the zooming progress.
nCurrent | current zoom factor |
nPrevious | previous zoom factor |
nStep | step which shouldn't be skipped |
Definition at line 69 of file zoomtools.cxx.
|
static |
Round a value against a specified multiple.
Values below half of the multiple are rounded down and all others are rounded up.
nCurrent | current value |
nMultiple | multiple against which the current value is rounded |
Definition at line 29 of file zoomtools.cxx.
Referenced by roundZoom().
|
static |
Convert geometric progression results into more common values by rounding them against certain multiples depending on the size.
Beginning with 50 the multiple is 5, with 100, 10, and so on.
nCurrent | current zoom factor |
Definition at line 42 of file zoomtools.cxx.
References roundMultiple().
BASEGFX_DLLPUBLIC sal_uInt16 basegfx::zoomtools::zoomIn | ( | sal_uInt16 | nCurrent | ) |
Increasing the zoom level.
nCurrent | current zoom factor |
Definition at line 83 of file zoomtools.cxx.
References enforceStep(), roundZoom(), and ZOOM_FACTOR.
BASEGFX_DLLPUBLIC sal_uInt16 basegfx::zoomtools::zoomOut | ( | sal_uInt16 | nCurrent | ) |
Decreasing the zoom level.
This namespace provides functions for optimized geometric zooming.
nCurrent | current zoom factor |
Definition at line 100 of file zoomtools.cxx.
References enforceStep(), roundZoom(), and ZOOM_FACTOR.
const double basegfx::zoomtools::ZOOM_FACTOR = 1.12246205 |
2^(1/6) as the default step
This ensures (unless the rounding is used) that 6 steps lead to double / half zoom level.
Definition at line 20 of file zoomtools.cxx.