pdfobjects::CPageDisplay Class Reference

#include <cpagedisplay.h>

Inheritance diagram for pdfobjects::CPageDisplay:
pdfobjects::ICPageModule

List of all members.

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

Detailed Description

This class is representing the page display module.


Constructor & Destructor Documentation

pdfobjects::CPageDisplay::CPageDisplay ( CPage page  )  [inline]
pdfobjects::CPageDisplay::~CPageDisplay (  )  [inline]

References _page.


Member Function Documentation

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.

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.

Returns:
Rectangle specifying the box.

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
void pdfobjects::CPageDisplay::setDisplayParams ( const DisplayParams dp  ) 
void pdfobjects::CPageDisplay::setMediabox ( const libs::Rectangle &  rc  ) 

Sets media box of this page.

Parameters:
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  ) 
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.

Parameters:
tm Six number representing transform matrix.

References _page, pdfobjects::CPage::contents(), and pdfobjects::createOperator().


Member Data Documentation

Actual display parameters.

Referenced by getPageRect(), and setDisplayParams().


The documentation for this class was generated from the following files: