# LineDrawingItem

The `LineDrawingItem` class is a subclass of `DrawingItem` and represents a line drawing item used for drawing line segments on the view.

## Definition

*Assembly:* DynamsoftCaptureVisionBundle.aar

*Namespace:* com.dynamsoft.dce

```java
class LineDrawingItem extends DrawingItem
```

## Methods

| Method | Description |
|------- |-------------|
| [`getLine`](#getline) | Get the line information of the LineDrawingItem. |
| [`getMediaType`](#getmediatype) | Get the media type of the `DrawingItem`. |
| [`LineDrawingItem`](#linedrawingitemline) | Create an instance of LineDrawingItem. |
| [`LineDrawingItem(line,coordinateBase)`](#linedrawingitemlinecoordinatebase) | Create an instance of LineDrawingItem. |

## 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. |

### getLine

Get the line information of the LineDrawingItem.

```java
com.dynamsoft.core.LineSegment getLine(){}
```

### getMediaType

Get the media type of the `DrawingItem`.

```java
EnumDrawingItemMediaType getMediaType;
```

### LineDrawingItem(line)

Create an instance of `LineDrawingItem`.

```java
LineDrawingItem(com.dynamsoft.core.LineSegment line){}
```

**Parameters**

`line`: A [`LineSegment`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/android/api-reference/core/basic-structures/line-segment.md) object that stores the line coordinates information.

**Return Value**

An instance of `LineDrawingItem`.

### LineDrawingItem(line,coordinateBase)

Create an instance of `LineDrawingItem`.

```java
LineDrawingItem(com.dynamsoft.core.LineSegment line, EnumCoordinateBase coordinateBase){}
```

**Parameters**

`line`: A [`LineSegment`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/android/api-reference/core/basic-structures/line-segment.md) object that stores the line coordinates information.  
`coordinateBase`: The coordinate base of the `DrawingItem`.

**Return Value**

An instance of `LineDrawingItem`.
