# 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:* DynamsoftCaptureVisionBundle.aar

*Namespace:* com.dynamsoft.dce

```java
class TextDrawingItem extends DrawingItem
```

## Methods

| Method | Description |
|------- |-------------|
| [`getText`](#gettext) | Get the text information of the `TextDrawingItem`. |
| [`getTopLeftPoint`](#gettopleftpoint) | Get the top-left point of the `TextDrawingItem`. |
| [`getWidth`](#getwidth) | Get the width of the `TextDrawingItem`. |
| [`getHeight`](#getheight) | Get the height of the `TextDrawingItem`. |
| [`getMediaType`](#getmediatype) | Get the media type of the `DrawingItem`. |
| [`TextDrawingItem(text)`](#textdrawingitemtext) | Create an instance of `TextDrawingItem`. |
| [`TextDrawingItem(text,coordinateBase)`](#textdrawingitemtextcoordinatebase) | Create an instance of `TextDrawingItem`. |

## Inherited Methods

The following methods are inherited from the superclass [`DrawingItem`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md).

| Method | Description |
|------- |-------------|
| [`setDrawingStyleId`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#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`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#getdrawingstyleid) | Get the DrawingStyle of the `DrawingItem`. |
| [`setState`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#setstate) | Set the state of the `DrawingItem`. |
| [`getState`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#getstate) | Get the state of the `DrawingItem`. |
| [`getCoordinateBase`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#getcoordinatebase) | Get the coordinate base of the `DrawingItem`. The coordinate base is image by default. |
| [`getMediaType`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#getmediatype) | Get the media type of the `DrawingItem`. |
| [`addNote`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#addnote) | Add a note to the `DrawingItem`. |
| [`getNote`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#getnote) | Get the specified `Note`. |
| [`hasNote`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#hasnote) | Check whether the specified Note exists. |
| [`updateNote`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#updatenote) | Update the content of the specified `Note`. |
| [`deleteNote`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#deletenote) | Remove the specified `Note` with the specified name. |
| [`getAllNotes`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#getallnotes) | Get all `Notes` of this DrawingItem. |
| [`clearNotes`](https://www.dynamsoft.com/camera-enhancer/docs/mobile/programming/android/auxiliary-api/drawingitem.md#clearnotes) | Remove all `Notes` of this DrawingItem. |

### getText

Get the text information of the `TextDrawingItem`.

```java
String getText(){}
```

### getTopLeftPoint

Get the top-left point of the `TextDrawingItem`.

```java
Point getTopLeftPoint(){}
```

### getWidth

Get the width of the `TextDrawingItem`.

```java
int getWidth(){}
```

### getHeight

Get the height of the `TextDrawingItem`.

```java
int getHeight(){}
```

### getMediaType

Get the media type of the `DrawingItem`.

```java
EnumDrawingItemMediaType getMediaType;
```

### TextDrawingItem(text)

Create an instance of `TextDrawingItem`.

```java
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`.

```java
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`.
