# Shape

Each ImageAnnotationTarget has Shape selector that defines the image area that is being annotated.

## Shape

Each Shape has a `type`

and a `geometry`

.

Property | Type | Description |
---|---|---|

type | ShapeType | Enum indicating the type of shape |

geometry | Geometry | Object containing geometric properties |

### ShapeType

### Geometry

Every `Geometry`

has a `bounds`

property that represents the bounding box of the annotation, useful
for quick calculations without parsing the entire geometry. Other geometry properties depend on the
type of shape.

### Bounds

Property | Type | Description |
---|---|---|

minX | number | Left X coordinate of the geometry bounding box. |

minY | number | Top Y coordinate of the geometry bounding box. |

maxX | number | Right X coordinate of the geometry bounding box. |

maxY | number | Bottom Y coordinate of the geometry bounding box. |

## Rectangle

The Rectangle shape is defined by its X/Y position and dimensions.

Property | Type | Description |
---|---|---|

x | number | X-coordinate of the top-left corner. |

y | number | Y-coordinate of the top-left corner. |

w | number | Width of the rectangle. |

h | number | Height of the rectangle. |

bounds | Bounds | Bounding box of the rectangle (redundant). |

## Polygon

The Polygon shape is defined by a list of X/Y points.

Property | Type | Description |
---|---|---|

points | Array<Array | Array of [x, y] coordinate pairs. |

bounds | Bounds | Polygon bounding box. |