#include <displayparams.h>
Public Member Functions | |
| DisplayParams () | |
| bool | operator== (const DisplayParams &dp) const |
| void | convertPixmapPosToPdfPos (double fromX, double fromY, double &toX, double &toY) const |
| void | convertPdfPosToPixmapPos (double fromX, double fromY, double &toX, double &toY) const |
Public Attributes | |
| double | hDpi |
| double | vDpi |
| libs::Rectangle | pageRect |
| int | rotate |
| GBool | useMediaBox |
| GBool | crop |
| GBool | upsideDown |
Static Public Attributes | |
| static const int | DEFAULT_HDPI = 72 |
| static const int | DEFAULT_VDPI = 72 |
| static const int | DEFAULT_ROTATE = 0 |
| static const int | DEFAULT_PAGE_LX = 0 |
| static const int | DEFAULT_PAGE_LY = 0 |
| static const int | DEFAULT_PAGE_RX = 612 |
| static const int | DEFAULT_PAGE_RY = 792 |
Graphical state parameters.
These parameters are used by xpdf when updating bounding boxex of content stream operators, displaying page etc.
| pdfobjects::DisplayParams::DisplayParams | ( | ) | [inline] |
Constructor. Default values are set.
| void pdfobjects::DisplayParams::convertPdfPosToPixmapPos | ( | double | fromX, | |
| double | fromY, | |||
| double & | toX, | |||
| double & | toY | |||
| ) | const [inline] |
Converting pdf position to position on pixmap of viewed page.
| fromX | X position in pdf page. | |
| fromY | Y position in pdf page. | |
| toX | return X position on viewed page. | |
| toY | return Y position on viewed page. |
References hDpi, pageRect, rotate, upsideDown, and vDpi.
Referenced by gui::PageViewS::convertPdfPosToPixmapPos(), gui::PageViewMode_Annotations::extraInitialize(), and gui::PageViewS::setCorrectSize().
| void pdfobjects::DisplayParams::convertPixmapPosToPdfPos | ( | double | fromX, | |
| double | fromY, | |||
| double & | toX, | |||
| double & | toY | |||
| ) | const [inline] |
Converting position from pixmap of viewed page to pdf position.
| fromX | X position on viewed page. | |
| fromY | Y position on viewed page. | |
| toX | return X position in pdf page. | |
| toY | return Y position in pdf page. |
References hDpi, pageRect, rotate, upsideDown, and vDpi.
Referenced by gui::PageViewS::contentsMouseMoveEvent(), and gui::PageViewS::convertPixmapPosToPdfPos().
| bool pdfobjects::DisplayParams::operator== | ( | const DisplayParams & | dp | ) | const [inline] |
Equality operator.
References crop, hDpi, pageRect, rotate, upsideDown, useMediaBox, and vDpi.
Crop the page.
Referenced by operator==().
const int pdfobjects::DisplayParams::DEFAULT_HDPI = 72 [static] |
Default horizontal dpi.
const int pdfobjects::DisplayParams::DEFAULT_PAGE_LX = 0 [static] |
Default x position of left upper corner.
const int pdfobjects::DisplayParams::DEFAULT_PAGE_LY = 0 [static] |
Default y position of right upper corner.
const int pdfobjects::DisplayParams::DEFAULT_PAGE_RX = 612 [static] |
Default A4 width on a device with 72 horizontal dpi.
const int pdfobjects::DisplayParams::DEFAULT_PAGE_RY = 792 [static] |
Default A4 height on a device with 72 vertical dpi.
const int pdfobjects::DisplayParams::DEFAULT_ROTATE = 0 [static] |
No rotatation.
const int pdfobjects::DisplayParams::DEFAULT_VDPI = 72 [static] |
Default vertical dpi.
Paramaters Horizontal DPI.
Referenced by convertPdfPosToPixmapPos(), convertPixmapPosToPdfPos(), operator==(), pdfobjects::CPageDisplay::setDisplayParams(), and gui::PageViewS::setZoomFactor().
| libs::Rectangle pdfobjects::DisplayParams::pageRect |
Page rotation.
Referenced by convertPdfPosToPixmapPos(), convertPixmapPosToPdfPos(), operator==(), pdfobjects::CPageDisplay::setDisplayParams(), gui::PageViewS::showPage(), and gui::PageViewS::updateDisplayParameters().
Upside down.
Referenced by convertPdfPosToPixmapPos(), convertPixmapPosToPdfPos(), operator==(), and gui::PageViewS::updateDisplayParameters().
Use page media box.
Referenced by operator==(), pdfobjects::CPageDisplay::setDisplayParams(), and gui::PageViewS::setZoomFactor().
Vertical DPI.
Referenced by convertPdfPosToPixmapPos(), convertPixmapPosToPdfPos(), operator==(), pdfobjects::CPageDisplay::setDisplayParams(), and gui::PageViewS::setZoomFactor().