# ImageDrawer

The `ImageDrawer` class is a utility class for drawing various shapes on images.

## Definition

*Package:* com.dynamsoft.utility

```java
public class ImageDrawer
```

## Methods

| Method               | Description |
|----------------------|-------------|
| [`ImageDrawer`](#imagedrawer) | Initializes a new instance of the `ImageDrawer` class. |
| [`drawOnImage`](#drawonimage) | Draws various shapes on an image. |

### ImageDrawer

Initializes a new instance of the `ImageDrawer` class.

```java
ImageDrawer()
```

### drawOnImage

Draws various shapes on an image.

```java
ImageData drawOnImage(ImageData imageData, Quadrilateral[] quads)
ImageData drawOnImage(ImageData imageData, Quadrilateral[] quads, int color, int thickness)
ImageData drawOnImage(ImageData imageData, LineSegment[] lines)
ImageData drawOnImage(ImageData imageData, LineSegment[] lines, int color, int thickness)
ImageData drawOnImage(ImageData imageData, Contour[] contours)
ImageData drawOnImage(ImageData imageData, Contour[] contours, int color, int thickness)
ImageData drawOnImage(ImageData imageData, Corner[] corners)
ImageData drawOnImage(ImageData imageData, Corner[] corners, int color, int thickness)
ImageData drawOnImage(ImageData imageData, Edge[] edges)
ImageData drawOnImage(ImageData imageData, Edge[] edges, int color, int thickness)
```

**Parameters**

`imageData` The image data to draw on.

`quads` The quadrilaterals to draw.

`lines` The line segments to draw.

`contours` The contours to draw.

`corners` The corners to draw.

`edges` The edges to draw.

`color` The color to use for drawing. Defaults to 0 (black).

`thickness` The thickness of the lines to draw. Defaults to 0.

**Return value**

An `ImageData` object representing the modified image data.

**See Also**

[ImageData](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/image-data.md)

[Quadrilateral](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/quadrilateral.md)

[LineSegment](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/line-segment.md)

[Contour](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/contour.md)

[Corner](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/corner.md)

[Edge](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/edge.md)
