#include "NOPage.h"
Public Member Functions | |
UInt32 | getFonts (NOFontVector &pFonts) |
NOFont | getFont (const UTF8Char *pURI) |
NOFont | addFont (const NOFont &pFont) |
NOFont | addFont (const UTF8Char *pFontFile) |
UInt32 | getImages (NOImageVector &pImages) |
NOImage | getImage (const UTF8String &pURI) |
NOImage | addImage (const NOImage &pImage) |
void | getPageSize (double &pWidth, double &pHeight) |
UInt32 | getPageNumber () const |
NODocument | getDocument () const |
void | copyResourcesFrom (const NOPage &pPage) |
void | normalizeContentStream () |
NOXFixedPage | getFixedPage () |
NOXFixedPage | createFixedPage () |
UInt32 | renderToImage (unsigned char *pBuffer, UInt32 pWidth, UInt32 pHeight, bool pAntiAliasing, bool pOutlineMode=false) |
UInt32 | renderToTiff (const UTF8Char *pFile, UInt32 pWidth, UInt32 pHeight, UInt32 pResolutionInPixelsPerInch, UInt32 pAntiAliasing) |
void | checkpoint () |
bool | undo () |
bool | redo () |
docexample_createpackage.cpp, docexample_createpage.cpp, docexample_extractimage.cpp, docexample_nocontentstream.cpp, and docexample_render.cpp.
NCommon::UInt32 NiXPSObjects::NOPage::getFonts | ( | NOFontVector & | pFonts | ) |
Returns the count of the number of fonts on this page and a vector with all the fonts.
pFonts | The vector to put the fonts in |
NOFont NiXPSObjects::NOPage::getFont | ( | const UTF8Char * | pURI | ) |
Returns the font corresponding to the URI
pURI | The URI of the font to get as a zero terminated UTF8Char pointer |
Add a font to this page and returns a handler to the new font
pFont | The font to add |
NOFont NiXPSObjects::NOPage::addFont | ( | const UTF8Char * | pFontFile | ) |
Add a font to this page and returns a handler to the new font
pFontFile | The font file to add as font |
NCommon::UInt32 NiXPSObjects::NOPage::getImages | ( | NOImageVector & | pImages | ) |
Returns the count of the number of images on this page and a vector with all the images
pImages | The vector to put the images in |
NOImage NiXPSObjects::NOPage::getImage | ( | const UTF8String & | pURI | ) |
Returns the image corresponding to the URI
pURI | The URI of the image to get as a UTF8String |
Add an image to this page and returns a handler to the new image
pImage | The image to add |
void NiXPSObjects::NOPage::getPageSize | ( | double & | pWidth, | |
double & | pHeight | |||
) |
Get the page size
pWidth | A reference to a float to fill in with the width. | |
pHeight | A reference to a float to fill in with the height. |
NCommon::UInt32 NiXPSObjects::NOPage::getPageNumber | ( | ) | const |
Get the page number of this page.
NODocument NiXPSObjects::NOPage::getDocument | ( | ) | const |
Returns the document this page belongs to.
void NiXPSObjects::NOPage::copyResourcesFrom | ( | const NOPage & | pPage | ) |
Copy over the resources from another page to this page
pPage | the Page to copy resources from |
void NiXPSObjects::NOPage::normalizeContentStream | ( | ) |
NOXFixedPage NiXPSObjects::NOPage::getFixedPage | ( | ) |
get the entry point to the object model for this page
NOXFixedPage NiXPSObjects::NOPage::createFixedPage | ( | ) |
create a Fixed page element, this is the entry point to the object model for this page
UInt32 NiXPSObjects::NOPage::renderToImage | ( | unsigned char * | pBuffer, | |
UInt32 | pWidth, | |||
UInt32 | pHeight, | |||
bool | pAntiAliasing, | |||
bool | pOutlineMode = false | |||
) |
Renders a page to an image buffer of specified width and height The renderer will put the image centralized in the image buffer if the aspect ratio of the buffer does not correspond to the aspect ratio of the page. Image buffer large enough to hold 3 bytes per pixel for an image of the specified width and height The width of the image to render to The height of the image to render to True or false indicating whether we should do (computationally intensive) antialiasing True or false controls rendering in outline mode
UInt32 NiXPSObjects::NOPage::renderToTiff | ( | const UTF8Char * | pFile, | |
UInt32 | pWidth, | |||
UInt32 | pHeight, | |||
UInt32 | pResolutionInPixelsPerInch, | |||
UInt32 | pAntiAliasing | |||
) |
Renders a page to an tiff file of specified width and height The renderer will put the image centralized if the aspect ratio of the buffer does not correspond to the aspect ratio of the page. Output Tiff file The width of the image to render to The height of the image to render to Resolution to be used in the file True or false indicating whether we should do (computationally intensive) antialiasing
void NiXPSObjects::NOPage::checkpoint | ( | ) |
Mark the current content of the page as a checkpoint for a future undo/redo.
bool NiXPSObjects::NOPage::undo | ( | ) |
Undo to last checkpoint, returns success or failure.
bool NiXPSObjects::NOPage::redo | ( | ) |
Redo to the next checkpoint, returns success or failure.