# QuadDrawingItem

The `QuadDrawingItem` class is a subclass of `DrawingItem`. It represents a drawing item that draws quadrilaterals on the view.

## Definition

*Assembly:* DynamsoftCaptureVisionBundle.aar

*Namespace:* com.dynamsoft.dce

```java
class QuadDrawingItem extends DrawingItem
```

## Methods

| Method | Description |
|------- |-------------|
| [`getQuad`](#getquad) | Get the quad information of the `QuadDrawingItem`. |
| [`getMediaType`](#getmediatype) | Get the media type of the `DrawingItem`. |
| [`QuadDrawingItem`](#quaddrawingitemquad) | Create an instance of `QuadDrawingItem`. |
| [`QuadDrawingItem(coordinateBase)`](#quaddrawingitemquadcoordinatebase) | Create an instance of `QuadDrawingItem`. |

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

### getQuad

Get the quad information of the `QuadDrawingItem`.

```java
com.dynamsoft.core.Quadrilateral getQuad(){}
```

**Return Value**

A [`Quadrilateral`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/android/api-reference/core/basic-structures/quadrilateral.md) object that stores the coordinates of the `QuadDrawingItem`.

### getMediaType

Get the media type of the `DrawingItem`.

```java
EnumDrawingItemMediaType getMediaType;
```

## QuadDrawingItem(quad)

Create an instance of `QuadDrawingItem`.

```java
QuadDrawingItem(com.dynamsoft.core.Quadrilateral quad){}
```

**Parameters**

`quad`: A `com.dynamsoft.core.Quadrilateral` object that stores the quad coordinates information.

**Return Value**

An instance of `QuadDrawingItem`.

## QuadDrawingItem(quad,coordinateBase)

Create an instance of `QuadDrawingItem`.

```java
QuadDrawingItem(com.dynamsoft.core.Quadrilateral quad, EnumCoordinateBase coordinateBase){}
```

**Parameters**

`quad`: A `com.dynamsoft.core.Quadrilateral` object that stores the quad coordinates information.  
`coordinateBase`: The coordinate base of the `DrawingItem`.

**Return Value**

An instance of `QuadDrawingItem`.
