NiXPSObjects::NOPage Class Reference

#include "NOPage.h"

Inherits NiXPSObjects::NOPartWithResources.

Collaboration diagram for NiXPSObjects::NOPage:
[legend]

List of all members.

Public Member Functions

UInt32 getFonts (NOFontVector &pFonts)
NOFont getFont (const UTF8Char *pURI)
NOFont addFont (const NOFont &pFont)
NOFont addFont (const UTF8Char *pFontFile)
NOFont addFontWithFamilyAndStyle (const UTF8Char *pFontFamilyName, const UTF8Char *pFontStyleName)
UInt32 getImages (NOImageVector &pImages)
NOImage getImage (const UTF8Char *pURI)
NOImage addImage (const NOImage &pImage)
NOImage addImage (const UTF8Char *pFontFile)
NOPackage getPackage ()
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 (UInt8 *pBuffer, UInt32 pWidth, UInt32 pHeight, bool pAntiAliasing, bool pOutlineMode=false)
UInt32 renderToImagePartial (UInt8 *pImageBuffer, UInt32 pWidth, UInt32 pHeight, doubleRect pXPSRect, bool pAntiAliasing, bool pOutlineMode)
UInt32 renderToTiff (const UTF8Char *pFile, UInt32 pWidth, UInt32 pHeight, UInt32 pResolutionInPixelsPerInch, UInt32 pAntiAliasing)
UInt32 exportToSVG (const UTF8Char *pFile)
void checkpoint ()
bool undo ()
bool redo ()
UInt32 findObjectAt (UInt32 pX, UInt32 pY, UInt32 pWidth, UInt32 pHeight)
NOBase getObject (UInt32 pID)
NOSelection getObjectsInParagraph (UInt32 pObjectID)
bool findAndSelectText (const UTF8Char *pText, UInt32 pOccurrence)
bool findAndSelectTextAll (const UTF8Char *pText)
bool hasTextSelection ()
void clearTextSelection ()
void getTextProperties (UInt32 pTextObjectID, double &pX1, double &pY1, double &pX2, double &pY2, double &pX3, double &pY3, double &pX4, double &pY4, double &pSize)
void selectTextMarquee (const doubleRect &pTextRectangle)
UInt32 getIDForTextSelection ()
void replaceText (UInt32 pTextObjectID, const UTF8Char *pSearch, const UTF8Char *pReplace)
NOTextSelection getTextSelection ()
doubleRect getBoundingBox (UInt32 pId)
void moveObject (UInt32 pId, double pDeltaX, double pDeltaY)
void removeObject (UInt32 pId)
NOSelection getCopyOfSelection ()
void setSelection (UInt32 pId, bool pIsSelected)
void swapSelection (UInt32 pId)
void clearSelection ()
void selectMarquee (const UInt32Rect &pRect, NCommon::UInt32 pWidth, NCommon::UInt32 pHeight, bool pSwap)
void selectAll ()
bool isTransparentObject (NCommon::UInt32 pId)
bool isRectangularObject (NCommon::UInt32 pId)
NOXCanvas copyPageOnTop (const NOPage &pPage)
bool flattenTransparency ()

Detailed Description

Class representing a page in an XPS package.


Member Function Documentation

NOFont NiXPSObjects::NOPage::addFont ( const UTF8Char *  pFontFile  ) 

Add a font to this page and returns a handler to the new font

Parameters:
pFontFile The font file to add as font
NOFont NiXPSObjects::NOPage::addFont ( const NOFont pFont  ) 

Add a font to this page and returns a handler to the new font

Parameters:
pFont The font to add
NOFont NiXPSObjects::NOPage::addFontWithFamilyAndStyle ( const UTF8Char *  pFontFamilyName,
const UTF8Char *  pFontStyleName 
)

Add a font with a certain family name and font style to this page Searches the system fonts. Returns a font in error state if it doesn't find an appropriate font

NOImage NiXPSObjects::NOPage::addImage ( const UTF8Char *  pFontFile  ) 

Add an image to this page and returns a handler to the new image

Parameters:
pImage The image file to add
NOImage NiXPSObjects::NOPage::addImage ( const NOImage pImage  ) 

Add an image to this page and returns a handler to the new image

Parameters:
pImage The image to add
NOXCanvas NiXPSObjects::NOPage::copyPageOnTop ( const NOPage pPage  ) 

copies the content of a page as a layer on top of this current page returns an interface to the inserted page content

void NiXPSObjects::NOPage::copyResourcesFrom ( const NOPage pPage  ) 

Copy over the resources from another page to this page

Parameters:
pPage the Page to copy resources from
UInt32 NiXPSObjects::NOPage::exportToSVG ( const UTF8Char *  pFile  ) 

Exports a page to an SVG file Output SVG file

bool NiXPSObjects::NOPage::findAndSelectText ( const UTF8Char *  pText,
UInt32  pOccurrence 
)

Find text and select its pOccurrence'th occurrence Text to find and select Which occurrence to find and select

bool NiXPSObjects::NOPage::findAndSelectTextAll ( const UTF8Char *  pText  ) 

Find text and select all occureances Text to find and select

UInt32 NiXPSObjects::NOPage::findObjectAt ( UInt32  pX,
UInt32  pY,
UInt32  pWidth,
UInt32  pHeight 
)

Find the topmost object at pX horizontal and pY vertical considering the page is rendered in an image of pWidth by pHeight pixels. The X-coordinate of the object to find The Y-coordinate of the object to find The width of the image to consider the coordinates in The height of the image to consider the coordinates in

NOSelection NiXPSObjects::NOPage::getCopyOfSelection (  ) 

Gets a copy of the selection. The returned object allows to query the selection.

NOFont NiXPSObjects::NOPage::getFont ( const UTF8Char *  pURI  ) 

Returns the font corresponding to the URI

Parameters:
pURI The URI of the font to get as a zero terminated UTF8Char pointer
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.

Parameters:
pFonts The vector to put the fonts in
NOImage NiXPSObjects::NOPage::getImage ( const UTF8Char *  pURI  ) 

Returns the image corresponding to the URI

Parameters:
pURI The URI of the image to get as a UTF8String
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

Parameters:
pImages The vector to put the images in
NOBase NiXPSObjects::NOPage::getObject ( UInt32  pID  ) 

Get object with Object ID

Parameters:
pID as an NOBase object The ID of the object to get
NOSelection NiXPSObjects::NOPage::getObjectsInParagraph ( UInt32  pObjectID  ) 

Return all text objects in the same paragraph as.

Parameters:
pObjectID 
void NiXPSObjects::NOPage::getPageSize ( double *  pWidth,
double *  pHeight 
)

Get the page size

Parameters:
pWidth A pointer to a double to fill in with the width.
pHeight A pointer to a double to fill in with the height.
UInt32 NiXPSObjects::NOPage::renderToImage ( UInt8 *  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::renderToImagePartial ( UInt8 *  pImageBuffer,
UInt32  pWidth,
UInt32  pHeight,
doubleRect  pXPSRect,
bool  pAntiAliasing,
bool  pOutlineMode 
)

Renders a part of 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 part 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 The rectangle in XPS space to render 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::selectMarquee ( const UInt32Rect &  pRect,
NCommon::UInt32  pWidth,
NCommon::UInt32  pHeight,
bool  pSwap 
)

Select the objects within a rectangle considering the page is rendered in an image of pWidth by pHeight pixels

Parameters:
pSwap When set to true it will not change the current selection but instead swap all the objects' selected state
void NiXPSObjects::NOPage::selectTextMarquee ( const doubleRect &  pTextRectangle  ) 

Select all text in the rectangle in XPS coordinates indicated by pTextRectangle This rectangle is interpreted as a text rectangle, so selecting a line can be done by dragging a narrow rectangle at the beginning of a line down to the beginning of the next line


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

Generated on Fri Nov 13 18:23:23 2009 for NiXPS Library SDK by  doxygen 1.6.1