# ImageDrawer

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

## Definition

*Namespace:* Dynamsoft.Utility


```csharp
class ImageDrawer : IDisposable
```

## Methods

| Method               | Description |
|----------------------|-------------|
| [`DrawOnImage`](#drawonimage) | Draws various shapes on an image. |

### DrawOnImage

Draws various shapes on an image.

```csharp
ImageData DrawOnImage(ImageData imageData, Quadrilateral[] quads, int color = unchecked((int)0xFFFF0000), int thickness = 1);
ImageData DrawOnImage(ImageData imageData, LineSegment[] lines, int color = unchecked((int)0xFFFF0000), int thickness = 1);
ImageData DrawOnImage(ImageData imageData, Contour[] contours, int color = unchecked((int)0xFFFF0000), int thickness = 1);
ImageData DrawOnImage(ImageData imageData, Corner[] corners, int color = unchecked((int)0xFFFF0000), int thickness = 1);
ImageData DrawOnImage(ImageData imageData, Edge[] edges, int color = unchecked((int)0xFFFF0000), int thickness = 1);
```

**Parameters**

`[in] imageData` The image data to draw on.

`[in] quads` An array of quadrilaterals to draw on the image.

`[in] lines` An array of line segments to draw on the image.

`[in] contours` An array of contours to draw on the image.

`[in] corners` An array of corners to draw on the image.

`[in] edges` An array of edges to draw on the image.

`[in] color` The color to use for drawing. Defaults to 0xFFFF0000 (red).

`[in] thickness` The thickness of the lines to draw. Defaults to 1.

**Return value**

Returns the modified image data.

**See Also**

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

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

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

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

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

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