setAnnotation
Update an existing OpenScreen annotation by ID to change its timeline span, type, position, size, text, look, or figure/blur data; only supplied fields change.
Instructions
Change an existing annotation by id: its span (virtual-timeline seconds), its type, its centre (x/y, percent of its box), its size (width/height, arrow and blur only), its text and look (text only: fontSize, color, background, bold, animation), or its figureData / blurData, of which only the keys you pass change. Only the fields you pass are changed. A type change converts it as the editor's type switch does: it stays where it is on screen, a text turned into an arrow or a blur takes the default box, and the text is kept to come back to. A text box is refitted to its text around its centre. Arguments that belong to another kind (width on a text, blurData on an arrow) are refused. A new span that would run into another annotation is refused, naming it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| bold | No | ||
| text | No | ||
| type | No | text: words on the frame. figure: an arrow. blur: a privacy mask that blurs or pixelates what is under it, such as an email address or a token on screen. | |
| color | No | Text colour, a CSS colour such as #ffffff. | |
| width | No | Box width, in percent of the annotation's box: the output frame for an arrow, the recording's picture for a blur. Not for text, whose box is its words. | |
| endSec | No | ||
| height | No | Box height, in percent of the same box as width. | |
| blurData | No | A blur's look: type blur or mosaic, shape rectangle or oval, color of the mosaic grid, intensity, blockSize. | |
| fontSize | No | Text size; 32 is the editor's default, a title reads well at 56 to 80. | |
| startSec | No | ||
| animation | No | How the text enters: typewriter types it out, pop springs it in, and so on. | |
| projectId | No | The project to act on, from listProjects. Omit it only for the project open in the OpenScreen editor, which works only while the app runs. | |
| background | No | Colour of the plate behind the text, or "none" for no plate. | |
| figureData | No | An arrow's direction, colour and stroke width. | |
| annotationId | Yes |