ezu-paint 0.3.0

Paint GIS features onto a hokusai surface for ezu
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Document-level parameter substitution.

mod common;
use common::render;

#[test]
fn param_substitution_works() {
    let json = r##"{
      "name": "demo",
      "tile-size": 8,
      "params": { "bg": { "type": "color", "default": "#102030" } },
      "nodes": { "out": { "op": "solid", "color": "$bg" } },
      "output": "@out"
    }"##;
    let r = render(json, 8, 0);
    assert_eq!(r.pixel(0, 0), [0x10, 0x20, 0x30, 0xff]);
}