#include <cpagedisplay.h>
Public Member Functions | |
| CPageDisplay (CPage *page) | |
| ~CPageDisplay () | |
| int | getRotation () const |
| void | setRotation (int rot) |
| libs::Rectangle | getMediabox () const |
| void | setMediabox (const libs::Rectangle &rc) |
| libs::Rectangle | getPageRect () const |
| void | setTransformMatrix (double tm[6]) |
| void | setDisplayParams (const DisplayParams &dp) |
| void | displayPage (::OutputDev &out, int x=-1, int y=-1, int w=-1, int h=-1) |
| void | displayPage (::OutputDev &out, boost::shared_ptr< CDict > pagedict, int x=-1, int y=-1, int w=-1, int h=-1) |
| void | createXpdfDisplayParams (boost::shared_ptr< GfxResources > &res, boost::shared_ptr< GfxState > &state) |
Private Attributes | |
| CPage * | _page |
| DisplayParams | _params |
This class is representing the page display module.
| pdfobjects::CPageDisplay::CPageDisplay | ( | CPage * | page | ) | [inline] |
| pdfobjects::CPageDisplay::~CPageDisplay | ( | ) | [inline] |
References _page.
| void pdfobjects::CPageDisplay::createXpdfDisplayParams | ( | boost::shared_ptr< GfxResources > & | res, | |
| boost::shared_ptr< GfxState > & | state | |||
| ) |
Creates xpdf's state and resource parameters.
| void pdfobjects::CPageDisplay::displayPage | ( | ::OutputDev & | out, | |
| boost::shared_ptr< CDict > | pagedict, | |||
| int | x = -1, |
|||
| int | y = -1, |
|||
| int | w = -1, |
|||
| int | h = -1 | |||
| ) |
Draws page using specified page dictionary on an output device with last used display parameters.
| out | Output device. | |
| dict | If not null, page is created from dict otherwise this page dictionary is used. But still some information is gathered from this page dictionary. |
| void pdfobjects::CPageDisplay::displayPage | ( | ::OutputDev & | out, | |
| int | x = -1, |
|||
| int | y = -1, |
|||
| int | w = -1, |
|||
| int | h = -1 | |||
| ) |
Draws page on an output device. Use old display params.
References _page, and pdfobjects::CPage::getDictionary().
| libs::Rectangle pdfobjects::CPageDisplay::getMediabox | ( | ) | const |
Returns media box of this page.
It is a required item in page dictionary (spec p.119) but can be inherited from a parent in the page tree.
References pdfobjects::CPageAttributes::InheritedAttributes::_mediaBox, _page, debug::DBG_DBG, pdfobjects::CPageAttributes::fillInherited(), pdfobjects::CPage::getDictionary(), pdfobjects::utils::getDoubleFromArray(), and kernelPrintDbg.
| libs::Rectangle pdfobjects::CPageDisplay::getPageRect | ( | ) | const |
Returns rect of this page.
References _params, and pdfobjects::DisplayParams::pageRect.
| int pdfobjects::CPageDisplay::getRotation | ( | ) | const |
Returns rotation in degrees.
References _page, pdfobjects::CPageAttributes::InheritedAttributes::_rotate, pdfobjects::CPageAttributes::fillInherited(), and pdfobjects::CPage::getDictionary().
| void pdfobjects::CPageDisplay::setDisplayParams | ( | const DisplayParams & | dp | ) |
| void pdfobjects::CPageDisplay::setMediabox | ( | const libs::Rectangle & | rc | ) |
Sets media box of this page.
| rc | Rectangle for the media box. |
As a side effect it changes also CropBox and TrimBox if they are set.
References _page, pdfobjects::CArray::addProperty(), pdfobjects::Specification::Page::CROPBOX, debug::DBG_DBG, pdfobjects::CPage::getDictionary(), kernelPrintDbg, pdfobjects::Specification::Page::MEDIABOX, pdfobjects::CObjectSimple< Tp >::setValue(), and pdfobjects::Specification::Page::TRIMBOX.
| void pdfobjects::CPageDisplay::setRotation | ( | int | rot | ) |
Sets rotation in degrees.
References _page, pdfobjects::CPage::getDictionary(), and pdfobjects::Specification::Page::ROTATE.
| void pdfobjects::CPageDisplay::setTransformMatrix | ( | double | tm[6] | ) |
Sets transform matrix of a page. This operator will be preceding first cm operator (see pdf specification), if not found it will be the first operator.
| tm | Six number representing transform matrix. |
References _page, pdfobjects::CPage::contents(), and pdfobjects::createOperator().
CPage* pdfobjects::CPageDisplay::_page [private] |
Pdf dictionary representing a page.
Referenced by displayPage(), getMediabox(), getRotation(), setDisplayParams(), setMediabox(), setRotation(), setTransformMatrix(), and ~CPageDisplay().
Actual display parameters.
Referenced by getPageRect(), and setDisplayParams().