Skip to main content

Crate ezu_paint

Crate ezu_paint 

Source
Expand description

Paint MVT features onto a raster canvas.

Three painting primitives are exposed:

  • paint_polygonstiny-skia solid fill + optional outline + libblur gaussian blur. Fast path for large patches.
  • paint_polygons_dabshokusai scatter-dab fill with world-deterministic jitter (seamless across tile boundaries).
  • paint_lineshokusai::Brush::stroke_to along polylines.

These are the building blocks for the graph nodes in nodes; the host-side glue (PNG encoding, asset loading) lives in host.

All painting happens on a Canvas that optionally wraps a padded buffer (tile_size + 2 * pad). Paint operations work in the padded space; cropping happens at the host boundary.

Re-exports§

pub use brush::BrushDefaults;
pub use dabs::paint_polygons_dabs;
pub use dabs::DabFillStyle;
pub use strokes::paint_lines;
pub use strokes::LineStrokeStyle;

Modules§

brush
Extract paint-friendly defaults from a hokusai Brush.
builtin
Built-in brushes, bundled into the binary via include_str!.
dabs
Hokusai-backed dab scatter fill.
host
A raster canvas backed by a premultiplied RGBA Pixmap.
nodes
Node implementations for the graph evaluator. One file per op.
render
Feature filtering and collection helpers shared by feature-source nodes (features).
strokes
Polyline watercolor stroking via hokusai::Brush::stroke_to.

Structs§

Brush
Canvas
RgbaF32
WatercolorStyle
Style for a watercolor polygon layer.

Enums§

PaintError

Functions§

paint_polygons
Paint a collection of MVT polygons onto a fresh transparent layer, blur it, and composite it over canvas (source-over).