pub fn describe(paintop_id: &str) -> Option<&'static str> {
Some(match paintop_id {
"paintbrush" => "pixel brush — the main pixel-stamping engine",
"colorsmudge" => "color smudge — picks up and blends canvas color",
"duplicate" => "duplicate / clone stamp",
"deformbrush" => "deform — pixel warp (grow, shrink, swirl, push)",
"filter" => "filter brush — paints with a filter applied to the dab",
"hairy" => "hairy / bristle — physics-driven multi-bristle strokes",
"hatching" => "hatching — parallel-line shading",
"particle" => "particle — physics trajectories with gravity / drag",
"spray" => "spray — particle cloud per dab",
"experiment" => "experimental — connect-the-dots vector painting",
"tangentnormal" => "tangent normal — paints normal-map data",
"gridbrush" => "grid — paints a grid of shapes",
"curvebrush" => "curve — connects points along a stroke with curves",
"dynabrush" => "dyna — physics-driven brush with mass / drag",
"sketchbrush" => "sketch — connects nearby strokes with cobweb lines",
"chalk" => "chalk — legacy chalky brush",
"mypaintbrush" => "mypaint — the MyPaint brush engine",
"roundmarker" => "round marker — fast circular stamp",
"quickbrush" => "quick — minimal pixel brush for speed",
"bristle" => "bristle — alias of hairy on some builds",
_ => return None,
})
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn describes_paintbrush() {
assert!(describe("paintbrush").unwrap().contains("pixel"));
}
#[test]
fn returns_none_for_unknown() {
assert!(describe("not-a-real-engine").is_none());
}
}