![]() |
SignDoc SDK (Java)
5.0.0
|
A cluster of Unicode code points and glyphs. More...
Public Member Functions | |
SignDocTextCluster () | |
Constructor. More... | |
synchronized String | getText () throws SignDocException |
Get the Unicode code points of the cluster. More... | |
synchronized int | getPage () throws SignDocException |
Get the page on which the glyphs of this object appear. More... | |
synchronized int[] | getPages () throws SignDocException |
Get the pages on which the glyphs of this object appear. More... | |
synchronized int | getUnicodeDirection () throws SignDocException |
Get the direction implied by the Unicode code points. More... | |
synchronized int | getNumberOfGlyphs () throws SignDocException |
Get the number of glyphs in this cluster. More... | |
synchronized int | getGlyphPage (int aIndex) throws SignDocException |
Get the page on which a glyph appears. More... | |
synchronized Point | getGlyphReferencePoint (int aIndex) throws SignDocException |
Get the reference point of a glyph. More... | |
synchronized Rect | getGlyphBoundingBox (int aIndex) throws SignDocException |
Get the bounding box of a glyph. More... | |
synchronized int | getGlyphTextRenderingMode (int aIndex) throws SignDocException |
Get the text rendering mode for a glyph. More... | |
synchronized double | getGlyphFontSize (int aIndex) throws SignDocException |
Get the font size for a glyph. More... | |
synchronized double | getGlyphAdvanceWidth (int aIndex) throws SignDocException |
Get the advance width of a glyph. More... | |
synchronized void | close () |
Destroy the underlying native object (for java.lang.AutoCloseable). More... | |
Protected Member Functions | |
void | finalize () throws Throwable |
Finalize this object. More... | |
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.
There is no clone() function as SignDocTextCluster objects cannot be modified.
Constructor.
synchronized void close | ( | ) |
Destroy the underlying native object (for java.lang.AutoCloseable).
After calling this method, all methods but close() will throw SignDocUnexpectedErrorException.
|
protected |
Finalize this object.
Do not call this method unless you know what you are doing.
synchronized double getGlyphAdvanceWidth | ( | int | aIndex | ) | throws SignDocException |
Get the advance width of a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
synchronized Rect getGlyphBoundingBox | ( | int | aIndex | ) | throws SignDocException |
Get the bounding box of a glyph.
The bounding box is not available in some cases, e.g., for external fonts.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
synchronized double getGlyphFontSize | ( | int | aIndex | ) | throws SignDocException |
Get the font size for a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
synchronized int getGlyphPage | ( | int | aIndex | ) | throws SignDocException |
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().
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
synchronized Point getGlyphReferencePoint | ( | int | aIndex | ) | throws SignDocException |
Get the reference point of a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
synchronized int getGlyphTextRenderingMode | ( | int | aIndex | ) | throws SignDocException |
Get the text rendering mode for a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
synchronized int getNumberOfGlyphs | ( | ) | throws SignDocException |
Get the number of glyphs in this cluster.
The order of the glyphs is unspecified.
synchronized int getPage | ( | ) | throws SignDocException |
Get the page on which the glyphs of this object appear.
The glyphs of a cluster can appear on different pages, even on pages outside the range of pages passed to SignDocDocument.findText() or SignDocDocument.createTextIterator().
synchronized int [] getPages | ( | ) | throws SignDocException |
Get the pages on which the glyphs of this object appear.
The glyphs of a cluster can appear on different pages, even on pages outside the range of pages passed to SignDocDocument.findText() or SignDocDocument.createTextIterator().
synchronized String getText | ( | ) | throws SignDocException |
Get the Unicode code points of the cluster.
synchronized int getUnicodeDirection | ( | ) | throws SignDocException |
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.