lib
KoZoomHandler Class Reference
#include <KoZoomHandler.h>
Inheritance diagram for KoZoomHandler:

Detailed Description
This class handles the zooming and DPI stuff (conversions between pt values and pixels).An instance of KoZoomHandler operates at a given zoom (see setZoomAndResolution() and setZoom()) so there is usually one instance of KoZoomHandler per view.
Definition at line 32 of file KoZoomHandler.h.
Public Member Functions | |
KoZoomHandler () | |
virtual | ~KoZoomHandler () |
virtual void | setZoomAndResolution (int zoom, int dpiX, int dpiY) |
double | zoomedResolutionX () const |
double | zoomedResolutionY () const |
double | resolutionX () const |
double | resolutionY () const |
double | zoomFactorX () const |
double | zoomFactorY () const |
void | setResolution (double resolutionX, double resolutionY) |
virtual void | setZoomedResolution (double zoomedResolutionX, double zoomedResolutionY) |
void | setZoom (int zoom) |
void | setZoomMode (KoZoomMode::Mode zoomMode) |
int | zoom () const |
KoZoomMode::Mode | zoomMode () const |
int | zoomItX (double z) const |
int | zoomItY (double z) const |
QPoint | zoomPoint (const KoPoint &p) const |
QRect | zoomRect (const KoRect &r) const |
QSize | zoomSize (const KoSize &s) const |
double | unzoomItX (int x) const |
double | unzoomItY (int y) const |
KoPoint | unzoomPoint (const QPoint &p) const |
KoRect | unzoomRect (const QRect &r) const |
Protected Attributes | |
int | m_zoom |
KoZoomMode::Mode | m_zoomMode |
double | m_resolutionX |
double | m_resolutionY |
double | m_zoomedResolutionX |
double | m_zoomedResolutionY |
Member Function Documentation
|
Set a resolution for X and Y, when no zoom applies (e.g. when painting an embedded document. This will set the zoom to 100, and it will set zoomedResolution[XY] to the resolution[XY] parameters Helper method, equivalent to setZoomAndResolution(100,...). Definition at line 44 of file KoZoomHandler.cpp. |
|
Change the zoom level, keeping the resolution unchanged.
Definition at line 62 of file KoZoomHandler.cpp. |
|
Change the zoom factor to 150 for 150%) and/or change the resolution, given in DPI. This is done on startup, when zooming, and when printing. The same call combines both so that all the updating done behind the scenes is done only once, even if both zoom and DPI must be changed. Reimplemented in ContextStyle. Definition at line 31 of file KoZoomHandler.cpp. |
|
Set the zoomed resolution for X and Y. Compared to the setZoom... methods, this allows to set a different zoom factor for X and for Y. Definition at line 53 of file KoZoomHandler.cpp. |
|
Change the zoom mode.
Definition at line 92 of file KoZoomHandler.h. |
|
Definition at line 97 of file KoZoomHandler.h. |
|
Definition at line 52 of file KoZoomHandler.h. |
|
Zoom factor for X. Equivalent to zoomedResolutionX()/resolutionX() Definition at line 61 of file KoZoomHandler.h. |
|
Zoom factor for Y. Equivalent to zoomedResolutionY()/resolutionY() Definition at line 65 of file KoZoomHandler.h. |
|
Definition at line 102 of file KoZoomHandler.h. |
|
Returns the size in pixels for a input size in points. This function can return a size with 1 pixel to less, depending on the reference point and the width and/or the zoom level. It's save to use if the starting point is (0/0). You can use it if you don't know the starting point yet (like when inserting a picture), but then please take care of it afterwards, when you know the reference point. Definition at line 131 of file KoZoomHandler.h. |
The documentation for this class was generated from the following files: