# ImageEditorPointsAnnotation (@salmonui/editors/image-editor)

> The ImageEditorPointsAnnotation interface of @salmonui/editors/image-editor: line and arrow use two points; path and freehand any number. Points are [x0, y0, x1, y1, ...].

Canonical: https://salmonui.dev/docs/reference/editors/image-editor/ImageEditorPointsAnnotation

```ts
import type { ImageEditorPointsAnnotation } from '@salmonui/editors/image-editor';
```

Entry index: https://salmonui.dev/docs/reference/editors/image-editor (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/editors/image-editor.md).

## Reference

Kind: interface

```ts
interface ImageEditorPointsAnnotation extends AnnotationCommon, ImageEditorShapeStyle {
    readonly kind: 'line' | 'arrow' | 'path' | 'freehand';
    readonly points: readonly number[];
    readonly closed?: boolean | undefined;
}
```

`line` and `arrow` use two points; `path` and `freehand` any number. Points are `[x0, y0, x1, y1, ...]`.

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `kind` | `readonly kind: 'line' \| 'arrow' \| 'path' \| 'freehand';` |  |  |
| `points` | `readonly points: readonly number[];` |  |  |
| `closed` | `readonly closed?: boolean \| undefined;` | optional | `path` only: joins the last point to the first (and fills with `fill`). |
| `id` | `id: string;` | inherited | Stable id; selection, history and callbacks use it. |
| `rotation` | `rotation?: number;` | optional, inherited | Clockwise degrees around the annotation's center. Default 0. |
| `opacity` | `opacity?: number;` | optional, inherited | 0 to 1. Default 1. |
| `stroke` | `stroke?: string;` | optional, inherited | CSS color; `'transparent'` or omitted draws no stroke for filled shapes. Default `'#e5484d'`. |
| `fill` | `fill?: string;` | optional, inherited | CSS color; omitted draws no fill. |
| `strokeWidth` | `strokeWidth?: number;` | optional, inherited | Default 4. |
