smix-annotate 10.1.0

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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// Odd-length and non-ASCII hex used to slice past the end / mid-char and
/// panic, instead of returning the BadHex the type already defines. Both
/// reach here from yaml (`annotate_bridge`, where a parse failure is
/// supposed to warn and fall back to a default colour) and from the CLI
/// `--annotate` mini-DSL, so a panic takes down the whole flow.
#[test]
fn malformed_hex_is_an_error_not_a_panic() {
    for bad in ["#F00", "#12345", "#ff00ff0", "#zz", "#日本語色"] {
        assert!(
            smix_annotate::Color::parse(bad).is_err(),
            "{bad} should be a BadHex error"
        );
    }
}