SignDoc SDK (C++)
5.0.0
|
A cluster of Unicode code points and glyphs. More...
#include <SignDocSDK-cpp.h>
Public Member Functions | |
SignDocTextCluster () | |
Constructor. More... | |
SignDocTextCluster (const SignDocTextCluster &aSource) | |
Copy constructor. More... | |
~SignDocTextCluster () | |
Destructor. More... | |
SignDocTextCluster & | operator= (const SignDocTextCluster &aSource) |
Assignment operator. More... | |
void | swap (SignDocTextCluster &aOther) |
Efficiently swap this object with another one. More... | |
const char * | getText () const |
Get the Unicode code points of the cluster (UTF-8). More... | |
int | getPage () const |
Get the page on which the glyphs of this object appear. More... | |
void | getPages (std::vector< int > &aOutput) const |
Get the pages on which the glyphs of this object appear. More... | |
int | getUnicodeDirection () const |
Get the direction implied by the Unicode code points. More... | |
const wchar_t * | getTextW () const |
Get the Unicode code points of the cluster (wide string). More... | |
int | getNumberOfGlyphs () const |
Get the number of glyphs in this cluster. More... | |
int | getGlyphPage (int aIndex) const |
Get the page on which a glyph appears. More... | |
bool | getGlyphReferencePoint (int aIndex, double &aX, double &aY) const |
Get the reference point of a glyph. More... | |
bool | getGlyphBoundingBox (int aIndex, Rect &aOutput) const |
Get the bounding box of a glyph. More... | |
int | getGlyphTextRenderingMode (int aIndex) const |
Get the text rendering mode for a glyph. More... | |
double | getGlyphFontSize (int aIndex) const |
Get the font size for a glyph. More... | |
double | getGlyphAdvanceWidth (int aIndex) const |
Get the advance width of a glyph. More... | |
SignDocTextCluster (SIGNDOC_TextCluster *aP) | |
Internal function. More... | |
const SIGNDOC_TextCluster * | getImpl () const |
Internal function. More... | |
Friends | |
class | SignDocFindTextOccurrence |
class | SignDocTextIterator |
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.
|
inline |
Constructor.
|
inline |
Copy constructor.
[in] | aSource | The object to be copied. |
|
inline |
Destructor.
|
inline |
Internal function.
|
inline |
Get the advance width of a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
|
inline |
Get the bounding box of a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
[out] | aOutput | The bounding box of the glyph in document coordinates, see Coordinate Systems. |
|
inline |
Get the font size for a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
|
inline |
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().
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
|
inline |
Get the reference point of a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
[out] | aX | The X coordinate of the reference point of the glyph in document coordinates (see Coordinate Systems). |
[out] | aY | The Y coordinate of the reference point of the glyph in document coordinates. |
|
inline |
Get the text rendering mode for a glyph.
[in] | aIndex | The 0-based index of the glyph. The order of the glyphs is unspecified. |
|
inline |
Internal function.
|
inline |
Get the number of glyphs in this cluster.
The order of the glyphs is unspecified.
|
inline |
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().
|
inline |
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().
[out] | aOutput | The 1-based page numbers of the pages on which the glyphs appear will be stored here. |
|
inline |
Get the Unicode code points of the cluster (UTF-8).
|
inline |
Get the Unicode code points of the cluster (wide string).
|
inline |
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.
|
inline |
Assignment operator.
[in] | aSource | The source object. |
|
inline |
Efficiently swap this object with another one.
[in] | aOther | The other object. |
|
friend |
|
friend |