smix-annotate 1.0.3

smix-annotate — screenshot annotation library. Composes circle / arrow / text / box / line primitives over PNG bytes with named color palette and 3-preset PNG compression. Powers `smix annotate` / `smix screenshot --annotate` CLI + `takeScreenshot: {annotate: [...]}` yaml verb + `--debug-output` fail-step auto-annotate.
Documentation

smix-annotate

Screenshot annotation primitives + PNG compression for smix.

Scope

  • 5 primitives: circle, arrow, text, box, line
  • 3 compression presets: fast, balanced (default), aggressive (via oxipng)
  • Named + hex + rgba color palette, plus semantic colors (EXPECTED, ACTUAL, HINT, ERROR, SUCCESS)
  • Position: absolute pixel + normalized 0..1
  • Text rendering via ab_glyph (font supplied by caller)

Library usage

use smix_annotate::{Annotator, Annotation, Color, Position, Compression};

let png = std::fs::read("input.png")?;
let out = Annotator::new(&png)?
    .add(Annotation::circle(Position::pixel(100, 100))
        .color(Color::RED)
        .radius(40))
    .compression(Compression::BALANCED)
    .render()?;
std::fs::write("output.png", out)?;

Non-goals

  • Selector-relative position resolution (smix-adapter-maestro runtime handles it)
  • Auto-annotate for --debug-output fail-step screenshots