> ## Documentation Index
> Fetch the complete documentation index at: https://docs.embededitor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Annotation Fields

> Every field a saved annotation holds, by its type, with the values each one takes and its default.

> [!NOTE]
>
> Available in the **Full** edition.

This page lists every field a saved annotation can hold, in `EditState`'s `annotations` and `annotationList`.

## Conventions

* Points (`{ x, y }`) and lengths are in the crop's px. A size or a width set by hand is a share of the photo's shorter side.
* The editor writes every value of a piece's style, its default too. It leaves out only what the piece has none of: a bend not set, no glue, no sides, no kept route, no points, no words, no width set, no step, no `faces`, no anchor, no arrows.
* A state you write may leave a field out. It reads as its default, given below.
* Every annotation has a `type`, an `id` (`a` followed by digits and lowercase letters) and a `color` (`#rrggbb` or `#rgb`).
* An `angle` is the turn of the piece's own frame on the photo, in degrees with 2 decimals, written in (−180°, 180°], in the sense `rotation` turns the photo. A piece is born level on the screen, the photo's turn and flips undone, so on a photo turned by `rotation` and not flipped it starts at minus that turn. From then on it turns and flips with the photo, and a piece with a body (a shape, a text, a Number, the list, a drawing, a lens) turns by its rotate handle too. Letters never mirror. Left out, `0`: the photo's own frame.

## Line

`type: 'LINE'`: a pointing line (an arrow), a shape's Line or a drawing.

**type** `'LINE'` *required*

**id** `string` *required*

**color** `string` *required*

**from** `\{ x: number; y: number \}` *required*

Its start.

**to** `\{ x: number; y: number \}` *required*

Its tip.

**role** `'ARROW' | 'SHAPE'`

`'SHAPE'` for a shape's Line. Left out, `'ARROW'`: a pointing line or a drawing.

**path** `'CURVE' | 'STRAIGHT' | 'ELBOW' | 'ROUNDED_ELBOW' | 'FREE'`

The way it runs. `FREE` runs along the stroke drawn by hand. Left out at its kind's: `CURVE` for a pointing line, `STRAIGHT` for a shape's Line, `FREE` for a drawing.

**bend** `number | null`

A curve's bend, its signed share of the chord, −1 to 1. An elbow's middle leg, 0 to 1. Left out or `null`, automatic (an elbow's middle leg halfway).

**points** `\{ x: number; y: number; pressure?: number \}[]`

The stroke drawn by hand, with the pen's `pressure` (0 to 1) where a pen drew it. Kept whatever its `path`, so Freehand comes back as it was drawn.

**start** `'NONE' | 'ARROW' | 'BAR' | 'DOT' | 'TRIANGLE'`

Its start's end. Left out at its kind's: `NONE`.

**end** `'NONE' | 'ARROW' | 'BAR' | 'DOT' | 'TRIANGLE'`

Its tip's end. Left out at its kind's: `ARROW` on a pointing line, nothing on a shape's Line or a drawing.

**stroke** `'SOLID' | 'DASHED' | 'DOTTED' | 'SKETCH' | 'MARKER'`

Left out, `SOLID`.

**weight** `string`

One of the seven [weights](#common-values). Left out, `MEDIUM_THIN`.

**angle** `number`

Its own frame's turn: its elbow routes in it and its drawing's box stands in it. Set again level on the screen when its path becomes an elbow. A drawing's turns by its rotate handle; an arrow has none.

**glued** `\{ from?: string | null; to?: string | null \}`

What each end landed on and moves with: an annotation's `id`, or `'LIST'` for the list of the Numbers. Left out or `null`, a loose end. An end glued to the list is let go where it is when the list goes.

**sides** `\{ from?: string | null; to?: string | null \}`

The side (`TOP`, `BOTTOM`, `LEFT` or `RIGHT`) of the annotation each glued end glued to, in that one's own frame. Left out, the side its point gives.

**route** `\{ bend: number | null; corners: \{ x: number; y: number \}[]; middle: \{ axis: 'x' | 'y'; from: number; least: number; to: number \} | null \}`

An elbow's route kept as it was drawn, once the glue of its ends changed with no end, middle leg or bend moved (Detach, what an end was glued to deleted or unlisted, "+ Text" on it, its body moved): its corners from its start to its tip and its middle leg, in its own frame (the crop's px turned by its `angle`), for the `bend` it was routed with. It holds while its ends stand where its corners begin and end. Left out, the route its ends and what they are glued to give.

## Ruler

`type: 'RULER'`: a measure between two ends.

**type** `'RULER'` *required*

**id** `string` *required*

**color** `string` *required*

**from** `\{ x: number; y: number \}` *required*

**to** `\{ x: number; y: number \}` *required*

**angle** `number`

Its label's own frame's turn. The label turns with the photo, and a half turn more where it would read upside down. A ruler has no rotate handle.

**label** `string`

The measure written on it. Left out, empty.

**size** `number`

Its label's size, 0.02 to 0.065. Left out, small (`0.028`).

**ends** `'BAR' | 'ARROW' | 'NONE'`

What both its ends draw. Left out, `BAR`.

**stroke, weight** `string`

As a line's.

**theme** `'LIGHT' | 'DARK' | 'ACCENT'`

Its label's theme. Left out, `LIGHT`.

## Text and Number

`type: 'TEXT'`: a text, or a Number of the Number tool.

**type** `'TEXT'` *required*

**id** `string` *required*

**color** `string` *required*

**at** `\{ x: number; y: number \}` *required*

The point its box grows from: the box's center where it grows both ways, else the middle of the side it is held by.

**role** `'TEXT' | 'NUMBER'`

`'NUMBER'` for a Number. Left out, `'TEXT'`.

**angle** `number`

Its own frame's turn: its box, its badge and its letters stand in it. Turned by its rotate handle, and a text pinned to a shape, a drawing or a lens turns with that piece.

**title** `string`

Its title's words. Left out, empty.

**body** `string`

The words under the title. Left out, empty.

**grows** `\{ x: 'BOTH' | 'LEFT' | 'RIGHT'; y: 'BOTH' | 'DOWN' | 'UP' \}`

The way it grows from `at`. `'LEFT'` holds its right edge, `'RIGHT'` its left, `'UP'` its bottom, `'DOWN'` its top. Left out, both ways on both.

**faces** `'TOP' | 'BOTTOM' | 'LEFT' | 'RIGHT'`

The side of its box facing what it is pinned to (a lens, a shape or a drawing), or, on the text "+ Text" made for a line, the line's start (`'BOTTOM'` over it, `'TOP'` under it). Its words lay out from that side, which stays put. Left out on a text that faces nothing.

**anchor** `\{ kind: 'POINT'; at \} | \{ kind: 'PIECE'; id \} | null`

What it points at: a point, or the annotation it is pinned to. Left out, nothing.

**arrows** `object[]`

The arrows the user added to it. See [Added arrows](#added-arrows).

**look** `'PLAIN' | 'BOX' | 'CAPTION'`

Plain, on a box, or `CAPTION`: filled letters in a thick outline. Left out, `BOX`.

**corners** `'SQUARE' | 'SOFT' | 'ROUND'`

Its box's corners. Left out, `ROUND`.

**padding** `'TIGHT' | 'NORMAL' | 'LOOSE'`

The room its box keeps round its words. Left out, `NORMAL`.

**font** `'inter' | 'montserrat' | 'oswald' | 'anton' | 'playfair-display' | 'courier-prime' | 'caveat' | 'pacifico' | 'permanent-marker'`

Its letter, by its slug. Left out, `inter`.

**size** `number`

Its title's size, 0.02 to 0.065. Left out, `0.036`.

**width** `number | null`

A width set by hand: its box's exact width. Left out or `null`, its box hugs its words.

**theme** `'LIGHT' | 'DARK' | 'ACCENT'`

What sits behind its words. Left out, `LIGHT`.

**mark** `'NONE' | 'DOT' | 'NUMBER'`

What stands before a text's title. Left out, the dot. A Number's is never read: it always shows its badge.

**step** `number`

Its place in its count: a Number's among the Numbers, a text's in the number format among those texts. Left out, none: it counts first, in the list's order.

## Shape

`type: 'SHAPE'`: a rectangle, a rounded rectangle or an ellipse.

**type** `'SHAPE'` *required*

**id** `string` *required*

**color** `string` *required*

**box** `\{ x: number; y: number; width: number; height: number \}` *required*

Its box, in its own frame.

**angle** `number`

Its own frame's turn on the photo, about its box's middle. Turned by its rotate handle.

**kind** `'RECT' | 'ROUNDED' | 'ELLIPSE'`

Left out, `ELLIPSE`.

**fill** `number`

The opacity its inside is filled at in its color, 0 to 1 (the bar's presets 0.13, 0.5 and 1). Left out, `0`: its outline alone.

**stroke, weight** `string`

Its outline's, as a line's.

## Lens

`type: 'LENS'`: a magnified detail, with a line to the point it magnifies.

**type** `'LENS'` *required*

**id** `string` *required*

**color** `string` *required*

**at** `\{ x: number; y: number \}` *required*

Its center.

**radius** `number` *required*

Its radius, above 0.

**origin** `\{ x: number; y: number \}` *required*

The point it magnifies.

**zoom** `number`

Its magnification, 1 to 8 (the bar's presets 1, 1.5, 2, 2.5 and 3, its slider 1 to 3). Left out, `1.5`.

**shape** `'CIRCLE' | 'ROUNDED'`

Left out, `CIRCLE`.

**theme** `'LIGHT' | 'DARK' | 'ACCENT'`

Its rim's theme. Left out, `LIGHT`.

**line** `'SOLID' | 'DASHED' | 'DOTTED' | 'SKETCH' | 'MARKER' | 'TRANSPARENT'`

Its line's stroke. Left out, `SOLID`.

**path** `'CURVE' | 'STRAIGHT' | 'ELBOW' | 'ROUNDED_ELBOW'`

The way its line runs, never `FREE`. Left out, `CURVE`.

**bend** `number | null`

Its line's bend, as a line's. Left out, automatic.

**weight** `string`

Its line's weight. Left out, `MEDIUM_THIN`.

**start** `'NONE' | 'ARROW' | 'BAR' | 'DOT' | 'TRIANGLE'`

How its line ends at the lens. Left out, `NONE`.

**end** `'NONE' | 'ARROW' | 'BAR' | 'DOT' | 'TRIANGLE'`

How its line ends on the origin. Left out, `DOT`, the ringed dot.

**exit** `\{ x: number; y: number \} | null`

Where its line leaves its rim, a share (0 to 1) of its box, where the user moved it. Left out, toward the origin.

**angle** `number`

Its own frame's turn: its rim stands in it, and its line leaves it by the side that faces the origin. Turned by its rotate handle, which leaves `lineAngle` as it is.

**lineAngle** `number`

Its line's own frame's turn, apart from the lens's: its elbow routes in it. Set level on the screen when its path becomes an elbow. Left out, `0`.

## Added Arrows

A text's `arrows[]`, and the list's: each arrow the user added to it.

**to** `\{ x: number; y: number \}` *required*

Its tip.

**exit** `\{ x: number; y: number \} | null`

Its start on its owner's box (a text's box, the list's block), a share (0 to 1) of the box, where the user moved it. Left out, where the drawing puts it.

**glued** `string | null`

What its tip landed on and moves with: an annotation's `id` (its own text's too: a loop round it), or `'LIST'` for the list of the Numbers (the list's own arrow's too: a loop round it). Left out, a loose tip.

**side** `'TOP' | 'BOTTOM' | 'LEFT' | 'RIGHT' | null`

The side of that annotation its tip glued to. Left out where none did.

**route** `object`

Its elbow's route kept as it was drawn, as a line's `route`. Left out, the route its tip gives.

**angle** `number`

Its own frame's turn: it leaves its owner and its elbow routes in it.

**path, bend, start, end, stroke, weight** `string`

As a line's. Each left out reads as its default: a curve, no start, solid and medium thin, ending in the ringed dot.

## The List

`annotationList`: the Numbers' list, one block. `null`: no list.

**at** `\{ x: number; y: number \}` *required*

Its block's center.

**angle** `number`

Its block's own frame's turn. Turned by its rotate handle.

**color** `string`

Its badges' color. Left out, its first step's.

**font** `'inter' | 'montserrat' | 'oswald' | 'anton' | 'playfair-display' | 'courier-prime' | 'caveat' | 'pacifico' | 'permanent-marker'`

Its letter, by its slug. Left out, its first step's.

**size** `number`

Its size, 0.02 to 0.065, as a text's. Left out, its first step's.

**title** `string`

Its title's words. Left out, none.

**theme** `'LIGHT' | 'DARK' | 'ACCENT'`

Left out, `LIGHT`.

**width** `number | null`

A width set by hand: its block's exact width. Left out or `null`, as wide as its longest row.

**above** `number`

How many annotations, the last made, draw over it. Left out, none: the list on top.

**arrows** `object[]`

Its own arrows from **Add Arrow**, leaving its block, each as an [added arrow](#added-arrows). Left out, none.

## Common Values

| Field | Values |
| - | - |
| `weight` | `EXTRA_THIN`, `THIN`, `MEDIUM_THIN` (default), `MEDIUM`, `MEDIUM_THICK`, `THICK`, `EXTRA_THICK`: 0.45, 0.57, 0.7, 0.9, 1.15, 1.45 and 1.85% of the photo's shorter side |
| `stroke` | `SOLID` (default), `DASHED`, `DOTTED`, `SKETCH`, `MARKER` |
| `start`, `end` | `NONE`, `ARROW`, `BAR`, `DOT`, `TRIANGLE` |
| `path` | `CURVE`, `STRAIGHT`, `ELBOW`, `ROUNDED_ELBOW`, `FREE` |
| `theme` | `LIGHT` (default), `DARK`, `ACCENT` |
| `font` | `inter` (Inter, default), `montserrat` (Montserrat), `oswald` (Oswald), `anton` (Anton), `playfair-display` (Playfair Display), `courier-prime` (Courier Prime), `caveat` (Caveat), `pacifico` (Pacifico), `permanent-marker` (Permanent Marker) |
| side | `TOP`, `BOTTOM`, `LEFT`, `RIGHT` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.