Namespace LMKit.Document.Annotations
Namespaces
Classes
- Annotation
One annotation record of the LM-Kit annotation standard - the canonical, format-agnostic markup model (see
Annotations/ANNOTATION-STANDARD.md, the single source of truth). The same record annotates any supported medium - a document page, an image, a frame - and never carries the vocabulary of a specific storage format: schema adapters load it from and save it to concrete formats with perfect conversion, and the appearance engine generates its visual form with full fidelity on every target.Geometry is in unrotated content points with a TOP-LEFT origin (y grows downward). Rotation is degrees clockwise about the rect centre; the rect and point lists stay in the unrotated frame.
Properties an annotation kind does not use stay at their defaults and are omitted from the wire. Unknown kinds and unknown wire properties round-trip untouched (Subtype raw string + ExtensionJson).
- AnnotationBatch
One commit of annotation changes in the LM-Kit annotation standard: the records to create, the records to update (matched by Id, replaced whole), and the identities to delete. The batch is format-agnostic - every schema adapter applies the same protocol to its own storage. Canonical JSON shape:
{"create":[…],"update":[…],"delete":[{"id":"…","pageIndex":0},…]}.
- AnnotationBatchResult
The outcome of applying an AnnotationBatch: how many records each operation actually touched, plus per-record errors for the ones it refused (the caller's store stays dirty for those, so a refused change is re-offered, never silently lost). Canonical JSON shape:
{"created":n,"updated":n,"deleted":n,"errors":[…]}.
- AnnotationJson
The canonical JSON schema adapter of the LM-Kit annotation standard: loads Annotation records from and saves them to the standard's camelCase wire (see
Annotations/ANNOTATION-STANDARD.md- field names are frozen; external stores persist this wire verbatim).Parsing is tolerant: absent properties keep their defaults, unknown properties are preserved verbatim in ExtensionJson (forward compatibility). Writing omits defaults and re-emits preserved extensions, so load → save round-trips losslessly. Implemented with JsonDocument / Utf8JsonWriter only - no reflection, safe under AOT/WASM.
- AnnotationKindMap
The standard's kind ⇄ wire-subtype mapping. The wire strings are frozen (v1) - external stores persist them verbatim, so they never change meaning or spelling.
- AnnotationRef
The identity of one annotation inside its annotated content.
Structs
- AnnotationPoint
A point in the standard's coordinate model: unrotated page/content points, TOP-LEFT origin, y growing downward (see
ANNOTATION-STANDARD.md§Coordinate model).
- AnnotationRect
An axis-aligned rectangle in the standard's coordinate model (top-left origin page points). For rotated kinds this is the bounds of the UNROTATED mark; Rotation applies about its centre.
Enums
- AnnotationBlendMode
Compositing mode of the mark's paint against the page.
- AnnotationBorderStyle
Stroke pattern of a stroked annotation. Dashed uses the normative pattern
[3w, 3w]wherewis BorderWidth.
- AnnotationFlags
Behavioral traits of an annotation, independent of any storage format. Combine freely. Format adapters translate these to whatever the target schema offers and preserve the full set for round-trip.
- AnnotationFontFamily
Font family of a FreeText mark. Three universal stacks every render target can honor; adapters map them to the target's closest standard faces.
- AnnotationFontStyle
Font slant of a FreeText mark.
- AnnotationFontWeight
Font weight of a FreeText mark.
- AnnotationKind
The annotation kinds of the LM-Kit annotation standard (see
Annotations/ANNOTATION-STANDARD.md, the single source of truth). Kinds are format-agnostic: the same record annotates a document page, an image, or any other supported medium. Each kind has a frozen wire name (the standard's Subtype string); AnnotationKindMap owns the mapping.
- AnnotationLineEnding
Ending decoration of a Line extremity. Arrow size is
max(11, 4.5w), circle radiusmax(3, 1.6w)(normative, see the standard).
- AnnotationTextAlign
Paragraph alignment of a FreeText mark.