TextDrawingItem
The TextDrawingItem class is a subclass of DrawingItem and represents a text drawing item, which can be added to draw texts on the view.
Definition
Assembly: package com.dynamsoft.dce
class TextDrawingItem extends DrawingItem
Methods
| Method | Description |
|---|---|
getText |
Get the text information of the TextDrawingItem. |
getTopLeftPoint |
Get the top-left point of the TextDrawingItem. |
getWidth |
Get the width of the TextDrawingItem. |
getHeight |
Get the height of the TextDrawingItem. |
getMediaType |
Get the media type of the DrawingItem. |
TextDrawingItem(text) |
Create an instance of TextDrawingItem. |
TextDrawingItem(text,coordinateBase) |
Create an instance of TextDrawingItem. |
Interited Methods
The following methods are inherited from the superclass DrawingItem.
| Method | Description |
|---|---|
setDrawingStyleId |
Set the DrawingStyle of the DrawingItem. If a DrawingItem holds a drawing style ID, it will not use the default style of its layer. |
getDrawingStyleId |
Get the DrawingStyle of the DrawingItem. |
setState |
Set the state of the DrawingItem. |
getState |
Get the state of the DrawingItem. |
getCoordinateBase |
Get the coordinate base of the DrawingItem. The coordinate base is image by default. |
getMediaType |
Get the media type of the DrawingItem. |
addNote |
Add a note to the DrawingItem. |
getNote |
Get the specified Note. |
hasNote |
Check whether the specified Note exists. |
updateNote |
Update the content of the specified Note. |
deleteNote |
Remove the specified Note with the specified name. |
getAllNotes |
Get all Notes of this DrawingItem. |
clearNotes |
Remove all Notes of this DrawingItem. |
getText
Get the text information of the TextDrawingItem.
String getText(){}
getTopLeftPoint
Get the top-left point of the TextDrawingItem.
Point getTopLeftPoint(){}
getWidth
Get the width of the TextDrawingItem.
int getWidth(){}
getHeight
Get the height of the TextDrawingItem.
int getHeight(){}
getMediaType
Get the media type of the DrawingItem.
EnumDrawingItemMeidaType getMediaType;
TextDrawingItem(text)
Create an instance of TextDrawingItem.
TextDrawingItem(String text, Point topLeftPoint, int width, int height){}
Parameters
text: A string that stores the text coordinates information.
topLeftPoint: The top-left point of the TextDrawingItem.
width: The width of the TextDrawingItem.
height: The height of the TextDrawingItem.
Return Value
An instance of TextDrawingItem.
TextDrawingItem(text,coordinateBase)
Create an instance of TextDrawingItem.
TextDrawingItem(String text, Point topLeftPoint, int width, int height, EnumCoordinateBase coordinateBase){}
Parameters
text: A string that stores the text coordinates information.
topLeftPoint: The top-left point of the TextDrawingItem.
width: The width of the TextDrawingItem.
height: The height of the TextDrawingItem.
coordinateBase: The coordinate base of the DrawingItem.
Return Value
An instance of TextDrawingItem.