TextRenderer Class
Represent the Text Renderer. It's used to calculate the text ink rendering in HTML5 canvas
Constructor
TextRenderer
(
-
context
Parameters:
-
contextObject
Item Index
Methods
_drawChar
(
private
-
char -
context -
parameters
Draw char
Parameters:
-
charCharInputComponent -
contextObjectThe canvas 2d context
-
parametersPenParameters
_drawCharacter
(
private
-
character -
context -
parameters
Draw character component
Parameters:
-
characterCharacterInputComponent -
contextObject -
parametersPenParameters
_drawRectangle
(
private
-
rectangle -
context -
parameters
Draw a rectangle on context
Parameters:
-
rectangleRectangle -
contextObject -
parametersPenParameters
_drawString
(
private
-
string -
context -
parameters
Draw string
Parameters:
-
stringStringInputComponent -
contextObjectThe canvas 2d context
-
parametersPenParameters
_drawStroke
(
private
-
stroke -
context -
parameters
Draw stroke component
Parameters:
-
strokeStrokeComponent -
contextObject -
parametersPenParameters
_drawTextComponent
(
private
-
component -
context -
parameters
Draw text component
Parameters:
-
componentAbstractTextInputComponent -
contextObject -
parametersPenParameters
clear
()
Clear the recognition context
drawRecognitionResult
(
-
components -
recognitionResult
Draw text recognition result on HTML5 canvas. Scratch out results are use to redraw HTML5 Canvas
Parameters:
-
componentsAbstractComponent[] -
recognitionResultTextDocument
getShowBoundingBoxes
()
Boolean
This property is use to show or not show the bounding box
Returns:
Boolean:
setShowBoundingBoxes
(
-
showBoundingBoxes
Set the show state of bounding box
Parameters:
-
showBoundingBoxesBoolean
