Document review
A review surface over a document: select text to highlight it, attach a callout comment, or write freehand in the margin. This is the shape a PDF or contract review interface takes. The annotations are vector objects carrying their own metadata, so an application can list them, filter them and store them next to the document rather than burning them into a picture.
Highlights and callouts
A highlight is one or more rectangles drawn with multiply blending, so the text under it stays legible - the right element for marking text, because a line of text is a rectangle. A callout is a text box with a pointer to an anchor, the shape a review comment takes; the pointer leaves whichever edge of the box faces the anchor, so it stays sensible when the callout is moved. Both can be made directly, without a tool:
_document.AddElement(new BinkHighlightElement(lineRects) { Color = BinkColor.Parse("#fde047"), Opacity = 0.5f, Description = "Highlighted: payment terms", }, _annotationLayer); _document.AddElement(new BinkCalloutElement(box: new BinkRect(320, 100, 200, 70), anchor: new Vector2(280, 130), text: "Please confirm this clause.") { Style = new BinkShapeStyle { FillColor = BinkColor.Parse("#fff9c4"), StrokeColor = BinkColor.Parse("#785a00") }, }, _annotationLayer);
The contract is real text: each line is a BinkTextElement on a locked "Page" layer, so it is
exported as text and read by a screen reader, while the review tools can only add to the "Annotations" layer
above it. Export SVG writes both, with Title and the per-element descriptions.
Turning a box into a comment
The page listens to the document itself rather than to the canvas callback. That way the conversion - a dragged rectangle becoming a callout, a highlight gaining a description of the text under it - runs while the change is still being reported, and joins the same undo step: one undo removes a comment entirely instead of first turning it back into a plain box.
_document.Changed += OnDocumentEdited; private void OnDocumentEdited(object? sender, BinkDocumentChangedEventArgs args) { // Only fresh local edits are converted: undo and redo replay a conversion that already happened. if (args.Origin != BinkChangeOrigin.Local || args.Depth > 0) return; foreach (BinkAddElementOperation add in AddedElements(args.Operation)) { if (add.LayerId == _annotationLayer) Convert(add.Element); } }