TextFragment
Contents
[
Hide
]
Inheritance: java.lang.Object
public class TextFragment
Represents a part of recognized text (word, symbol, etc), extracted by OCR engine.
Constructors
Constructor | Description |
---|---|
TextFragment(String text, Rectangle rectangle) | Initializes a new instance of the recognized text fragment. |
Methods
Method | Description |
---|---|
getText() | Gets a textual content of the recognized text fragment. |
getRectangle() | Gets a bounding rectangle of the recognized text fragment. |
TextFragment(String text, Rectangle rectangle)
public TextFragment(String text, Rectangle rectangle)
Initializes a new instance of the recognized text fragment.
Parameters:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | textual content of the recognized text fragment |
rectangle | java.awt.Rectangle | bounding rectangle of the recognized text fragment |
getText()
public String getText()
Gets a textual content of the recognized text fragment.
Returns: java.lang.String
getRectangle()
public Rectangle getRectangle()
Gets a bounding rectangle of the recognized text fragment.
Returns: java.awt.Rectangle