SignDoc SDK (C++)  5.0.0
SignDocFindTextOccurrence Class Reference

Information about text found by SignDocDocument::findText(). More...

#include <SignDocSDK-cpp.h>

Public Types

enum  GetBoundingBoxesFlags { gbbf_single = 0x01, gbbf_individual = 0x02, gbbf_logical = 0x04 }
 Flags for getBoundingBoxes(). More...
 

Public Member Functions

 SignDocFindTextOccurrence ()
 Constructor. More...
 
 SignDocFindTextOccurrence (const SignDocFindTextOccurrence &aSource)
 Copy constructor. More...
 
 ~SignDocFindTextOccurrence ()
 Destructor. More...
 
SignDocFindTextOccurrenceoperator= (const SignDocFindTextOccurrence &aSource)
 Assignment operator. More...
 
int getNumberOfClusters () const
 Get the number of clusters making up the hit. More...
 
bool getCluster (int aIndex, SignDocTextCluster &aOutput) const
 Get a cluster. 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...
 
void getBoundingBoxes (int aPage, unsigned aFlags, std::vector< Rect > &aOutput) const
 Get bounding boxes for the glyphs of this object. More...
 
 SignDocFindTextOccurrence (SIGNDOC_FindTextOccurrence *aP)
 Internal function. More...
 
SIGNDOC_FindTextOccurrence * getImpl ()
 Internal function. More...
 
const SIGNDOC_FindTextOccurrence * getImpl () const
 Internal function. More...
 
void setImpl (SIGNDOC_FindTextOccurrence *aP)
 Internal function. More...
 

Detailed Description

Information about text found by SignDocDocument::findText().

Member Enumeration Documentation

Flags for getBoundingBoxes().

Enumerator
gbbf_single 

Compute a single bounding box, viz, the smallest rectangle containing all the glyph bounding boxes.

gbbf_individual 

Return one bounding box per glyph.

gbbf_logical 

Compute logical bounding boxes.

If this flag is set, a heuristic will be used for computing bounding boxes that reflect the logical flow of the text. For instance, line breaks will start a new bounding box.

RTL text is not yet supported.

Constructor & Destructor Documentation

Constructor.

Copy constructor.

Parameters
[in]aSourceThe object to be copied.

Destructor.

SignDocFindTextOccurrence ( SIGNDOC_FindTextOccurrence *  aP)
inline

Internal function.

Member Function Documentation

void getBoundingBoxes ( int  aPage,
unsigned  aFlags,
std::vector< Rect > &  aOutput 
) const
inline

Get bounding boxes for the glyphs of this object.

Parameters
[in]aPageThe 1-based page number.
[in]aFlagsFlags controlling the behavior of this function, see enum GetBoundingBoxesFlags. Exactly one of gbbf_single, gbbf_individual, and gbbf_logical must be set.
[out]aOutputThe bounding boxes will be stored here.
bool getCluster ( int  aIndex,
SignDocTextCluster aOutput 
) const
inline

Get a cluster.

Parameters
[in]aIndexThe 0-based index of the cluster (logical order).
[out]aOutputThe cluster will be stored here.
Returns
true if successful, false if aIndex is out of range.
See also
getNumberOfClusters()
SIGNDOC_FindTextOccurrence* getImpl ( )
inline

Internal function.

const SIGNDOC_FindTextOccurrence* getImpl ( ) const
inline

Internal function.

int getNumberOfClusters ( ) const
inline

Get the number of clusters making up the hit.

Returns
The number of clusters.
int getPage ( ) const
inline

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

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

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
getPages(), SignDocTextCluster::getGlyphPage(), SignDocTextCluster::getPage()
void getPages ( std::vector< int > &  aOutput) const
inline

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

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

Parameters
[out]aOutputThe 1-based page numbers of the pages on which the glyphs appear will be stored here.
See also
getPage(), SignDocTextCluster::getGlyphPage(), SignDocTextCluster::getPages()
int getUnicodeDirection ( ) const
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.

Returns
-1 for RTL, 1 for LTR, 0 if the direction cannot be determined unambiguously.
SignDocFindTextOccurrence & operator= ( const SignDocFindTextOccurrence aSource)
inline

Assignment operator.

Parameters
[in]aSourceThe source object.
Returns
This object.
void setImpl ( SIGNDOC_FindTextOccurrence *  aP)
inline

Internal function.


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