SignDoc SDK (.NET without exceptions)  5.0.0
SignDocTextCluster Class Reference

A cluster of Unicode code points and glyphs. More...

Public Member Functions

 ~SignDocTextCluster ()
 Destructor. More...
 
 !SignDocTextCluster ()
 Finalizer. More...
 
 SignDocTextCluster (SignDocTextCluster aSource)
 Copy constructor. More...
 
string getText ()
 Get the Unicode code points of the cluster. More...
 
int getPage ()
 Get the page on which the glyphs of this object appear. More...
 
int[] getPages ()
 Get the pages on which the glyphs of this object appear. More...
 
int getUnicodeDirection ()
 Get the direction implied by the Unicode code points. More...
 
int getNumberOfGlyphs ()
 Get the number of glyphs in this cluster. More...
 
int getGlyphPage (int aIndex)
 Get the page on which a glyph appears. More...
 
Point getGlyphReferencePoint (int aIndex)
 Get the reference point of a glyph. More...
 
Rect getGlyphBoundingBox (int aIndex)
 Get the bounding box of a glyph. More...
 
int getGlyphTextRenderingMode (int aIndex)
 Get the text rendering mode for a glyph. More...
 
double getGlyphFontSize (int aIndex)
 Get the font size for a glyph. More...
 
double getGlyphAdvanceWidth (int aIndex)
 Get the advance width of a glyph. More...
 

Detailed Description

A cluster of Unicode code points and glyphs.

An object of this class contains a sequence of Unicode code points and a sequence of glyphs.

In the ideal case, each cluster contains exactly one Unicode code point and one glyph, making the relationship between the two unambiguous.

In the general case, the number of Unicode code points can be different from the number of glyphs and the relationship between the Unicode code points of the cluster and the glyphs of the cluster is unknown.

There can be more glyphs than Unicode code points, more Unicode code points than glyphs (e.g., for a ligature), or the same number of glyphs and Unicode code points.

The clusters returned by SignDocDocument.findText() may contain more characters than have been searched for (as clusters cannot be broken up). If a cluster contains multiple instances of the search text, SignDocDocument.findText() will return multiple instances of that cluster.

Constructor & Destructor Documentation

Destructor.

Finalizer.

Copy constructor.

Parameters
[in]aSourceThe object to be copied.
Returns
The new object.

Member Function Documentation

double getGlyphAdvanceWidth ( int  aIndex)

Get the advance width of a glyph.

Parameters
[in]aIndexThe 0-based index of the glyph. The order of the glyphs is unspecified.
Returns
The advance width of the glyph in document coordinates (see Coordinate Systems) or 0.0 if aIndex is out of range.
See also
getNumberOfGlyphs()
Rect getGlyphBoundingBox ( int  aIndex)

Get the bounding box of a glyph.

Parameters
[in]aIndexThe 0-based index of the glyph. The order of the glyphs is unspecified.
Returns
The bounding box of the glyph in document coordinates (see Coordinate Systems) or null if the bounding box is not available or if aIndex is out of range.
See also
getGlyphReferencePoint(), getNumberOfGlyphs(), SignDocFindTextOccurrence.getBoundingBoxes()
double getGlyphFontSize ( int  aIndex)

Get the font size for a glyph.

Parameters
[in]aIndexThe 0-based index of the glyph. The order of the glyphs is unspecified.
Returns
The font size of the glyph (in user space units) or 0.0 if aIndex is out of range.
See also
getNumberOfGlyphs()
int getGlyphPage ( int  aIndex)

Get the page on which a glyph appears.

In extreme (theoretical) cases, the glyphs of a single cluster can appear on different pages, even on pages outside the range of pages passed to SignDocDocument.findText() or SignDocDocument.createTextIterator().

Parameters
[in]aIndexThe 0-based index of the glyph. The order of the glyphs is unspecified.
Returns
The 1-based page number of the page on which the glyph appears or 0 if aIndex is out of range.
See also
getNumberOfGlyphs(), getPage(), getPages(), SignDocTextCluster.getGlyphPage()
Point getGlyphReferencePoint ( int  aIndex)

Get the reference point of a glyph.

Parameters
[in]aIndexThe 0-based index of the glyph. The order of the glyphs is unspecified.
Returns
The coordinates of the reference point of the glyph in document coordinates (see Coordinate Systems) or null if aIndex is out of range.
See also
getGlyphBoundingBox(), getNumberOfGlyphs()
int getGlyphTextRenderingMode ( int  aIndex)

Get the text rendering mode for a glyph.

Parameters
[in]aIndexThe 0-based index of the glyph. The order of the glyphs is unspecified.
Returns
The text rendering mode for the glyph, as defined in the PDF specification. 0 if aIndex is out of range or if the text rendering mode is invalid.
See also
getNumberOfGlyphs()
int getNumberOfGlyphs ( )

Get the number of glyphs in this cluster.

The order of the glyphs is unspecified.

Returns
The number of glyphs in this cluster.
int getPage ( )

Get the page on which the glyphs of this object appear.

The glyphs of a can appear on different pages, even on pages outside the range of pages passed to SignDocDocument.findText() or SignDocDocument.createTextIterator().

Returns
The 1-based page number of the page on which the glyphs appear or 0 if the glyphs appear on two or more different pages.
See also
getGlyphPage(), getPages(), SignDocFindTextOccurrence.getPage()
int [] getPages ( )

Get the pages on which the glyphs of this object appear.

The glyphs of a can appear on different pages, even on pages outside the range of pages passed to SignDocDocument.findText() or SignDocDocument.createTextIterator().

Returns
The 1-based page numbers of the pages on which the glyphs appear.
Note
The WinRT component returns null instead of an empty array.
See also
getGlyphPage(), getPage(), SignDocFindTextOccurrence.getPages()
string getText ( )

Get the Unicode code points of the cluster.

Returns
The Unicode code points of the cluster, in logical order.
int getUnicodeDirection ( )

Get the direction implied by the Unicode code points.

A lot of characters (such as punctuation characters) do not imply a direction. Unless there is at least one character that defines a direction, 0 will be returned. 0 is also returned if there are conflicting directions.

Returns
-1 for RTL, 1 for LTR, 0 if the direction cannot be determined unambiguously.

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