Expand description
Hokusai — pure Rust brush engine inspired by libmypaint.
Umbrella crate that re-exports the active backends based on cargo features.
Modules§
- brush
- The
Brushvalue: a full configuration consumed by the stroke engine. - brushmodes
- Pixel blending — port of libmypaint’s
brushmodes.c. - color
- Color types. Internal pipeline is linear sRGB; HSV is used at brush configuration boundaries (matches libmypaint).
- evaluator
- Setting evaluator: turn a
Brush+ normalized input values into the per-setting evaluated values needed by the dab loop. - fix15
- Fixed-point pixel math matching libmypaint’s
fix15representation. - input
- Brush inputs — drivers fed by the application each
stroke_tocall. - mapping
- Per-setting input → value mapping (piecewise-linear, matches libmypaint).
- myb
- rng
- libmypaint-compatible PRNG.
- setting
- Brush settings — 1:1 with libmypaint’s
brushsettings.jsonkeys. - spectral
- Spectral upsampling / downsampling for libmypaint’s pigment-style “paint” blend mode.
- state
- Per-stroke mutable state. Mirrors libmypaint’s
MyPaintBrushruntime fields so the stroke engine port can be a near-line-for-line translation. - stroke
- Stroke engine — port of libmypaint’s
mypaint_brush_stroke_to. - surface
TiledSurfaceabstraction and theDabdescription passed to it.- tile
- 64×64 RGBA fix15 tile — matches libmypaint’s tiling so brush math, tile traversal order, and rounding behaviour can be made bit-identical.
- tile_
mem
Structs§
Enums§
Constants§
Traits§
Type Aliases§
- Tile
Pixels [y][x][rgba]in fix15 (premultiplied alpha, linear sRGB).