CTextZonesUnit
The CTextZonesUnit class represents a unit that contains text zones. It is derived from CIntermediateResultUnit class and provides methods to retrieve the count and details of text zones.
Definition
Namespace: dynamsoft::intermediate_results
Assembly: DynamsoftCore
Inheritance: CIntermediateResultUnit -> CTextZonesUnit
class CTextZonesUnit : public CIntermediateResultUnit
Methods
| Method | Description |
|---|---|
GetCount |
Gets the number of text zones. |
GetTextZone |
Gets the quadrilateral shape of the text zone at the specified index. |
RemoveAllTextZones |
Removes all text zones from the unit. |
RemoveTextZone |
Removes the text zone at the specified index. |
AddTextZone |
Adds a text zone to the unit. |
SetTextZone |
Sets the text zone at the specified index. |
| Methods Inherited from CIntermediateResultUnit: | |
GetHashId |
Gets the hash ID of the unit. |
GetOriginalImageHashId |
Gets the hash ID of the original image. |
GetOriginalImageTag |
Gets the tag of the original image. |
GetType |
Gets the type of the intermediate result unit. |
Clone |
Creates a copy of the intermediate result unit. |
SetHashId |
Sets the hash ID of the unit. |
SetOriginalImageHashId |
Sets the hash ID of the original image. |
SetOriginalImageTag |
Sets the tag of the original image. |
Retain |
Increases the reference count of the unit. |
Release |
Decreases the reference count of the unit. |
GetTransformMatrix |
Gets the transformation matrix via CTransformMatrixType. |
SetTransformMatrix |
Sets the transformation matrix via CTransformMatrixType. |
GetCount
Gets the number of text zones in the unit.
virtual int GetCount() const
Return value
Returns the number of text zones in the unit.
GetTextZone
Gets the quadrilateral shape of the text zone at the specified index.
virtual int GetTextZone(int index, CTextZone* textZone) const = 0;
Parameters
[in] index The index of the text zone.
[in, out] textZone A pointer to a CTextZone object to receive the text zone.
Return Value
Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.
RemoveAllTextZones
Removes all text zones from the unit.
virtual void RemoveAllTextZones() = 0;
RemoveTextZone
Removes the text zone at the specified index.
virtual int RemoveTextZone(int index) = 0;
Parameters
index The index of the text zone to remove.
Return Value
Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.
AddTextZone
Adds a text zone to the unit.
virtual int AddTextZone(const CTextZone& textZone, const double matrixToOriginalImage[9] = IDENTITY_MATRIX) = 0;
Parameters
[in] textZone The text zone to add.
[in] matrixToOriginalImage The matrix to original image.
Return Value
Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.
SetTextZone
Sets the text zone at the specified index.
virtual int SetTextZone(int index, const CTextZone& textZone, const double matrixToOriginalImage[9] = IDENTITY_MATRIX) = 0;
Parameters
[in] index The index of the text zone to set.
[in] textZone The text zone to set.
[in] matrixToOriginalImage The matrix to original image.
Return Value
Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.