Skip to content
ArcadiaDesign

TSX

A picture over the whole window, in an Overlay, to mark: a pen, an arrow, a marker the picture shows through, and an eraser that takes marks and never the picture; words, placed with a press, dragged, edited and removed; a size, a person's inks and any other colour; undo and redo. Zoom and pan as in the viewer. Done hands back a new PNG at the picture's own size and the marks as data; the picture itself is never changed, and Cancel leaves everything as it was.

The marks are data in the picture's own pixels, whatever the zoom they were made at: a line drawn by hand as its points, an arrow from its tail to the head it points at, words with their text and the corner of their box, each with its colour and size. So a reader, a person's agent among them, is told what was marked without reading pixels, and marks opens the same picture again to go on. It stands at night whatever the page's theme, so the picture and its inks read the same everywhere.

A person's inks

The row of colours a picture is marked with, MARKING_INKS: fixed values, the same in either theme and in every product, since a mark is drawn into the picture's pixels and read back as data.

They are the only literal colours outside the kit's tokens; the editor uses them alone, and words take a thin edge in the tone opposite their ink so they read on any picture.

The picture is an application named by the tool in hand, so its keys reach it; an arrow and words each have a handle a key moves. The tools are one radio group and the inks another, the size a vertical slider. Escape stops what is being drawn, puts the words down, and with nothing drawn leaves; with marks drawn it keeps them, and Cancel leaves.

P, A, M, E, T
Pen, arrow, marker, eraser, words
Command or Ctrl Z, Shift Z
Undo, redo
Enter on the picture
Words, or an arrow, at its middle
Arrow keys on a handle
Move the mark; with Option or Alt, turn an arrow's head
Delete on a handle
Remove the mark
Space and a drag
Move the picture
Command or Ctrl Enter
Done

ImageMarkup

imagerequired
Blob | ImageBitmap
The picture, as its bytes or already decoded.
widthrequired
number
Its own size in pixels: the frame of every mark and the size of the PNG.
heightrequired
number
marks
readonly Mark[]
Marks to go on from.
label
stringDefault "Mark up"
Its name for assistive technology, in the product's words ("Annotate").
onDonerequired
(result: MarkupResult) => void
Done: the new picture and its marks.
onCancelrequired
() => void
Nothing is handed back.