diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-30 21:34:41 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-12 13:22:02 -0300 |
| commit | 2348776791e9dd17afeb12a06ba42a4a71917bcf (patch) | |
| tree | 780c4b12b76c8b97a28408dd40944d65f159fdc7 /test/shapes.script | |
| parent | 590ba7b9b579b97e34b51ab7e3460ebc85713343 (diff) | |
| download | sketchbook-2348776791e9dd17afeb12a06ba42a4a71917bcf.tar.gz sketchbook-2348776791e9dd17afeb12a06ba42a4a71917bcf.zip | |
sketchbook: a drawing layer on top, host fixes for replay and migration
Diffstat (limited to 'test/shapes.script')
| -rw-r--r-- | test/shapes.script | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/shapes.script b/test/shapes.script new file mode 100644 index 0000000..3111d5c --- /dev/null +++ b/test/shapes.script @@ -0,0 +1,30 @@ +# Command.shape natively: each case at points well inside it (edges are +# aliased here and antialiased on the web; tools/shapes_web.mjs compares +# whole pictures). Translucent colours blend once per command. +frames 2 +screenshot .zig-cache/shapes/native.png +frames 1 +# Two translucent circles: once alone, twice where they overlap. +expect-pixel .zig-cache/shapes/native.png 60 80 255 127 127 255 2 +expect-pixel .zig-cache/shapes/native.png 110 80 255 63 63 255 2 +# The concave polygon: one blend everywhere inside, nothing in its notch. +expect-pixel .zig-cache/shapes/native.png 300 40 127 191 127 255 2 +expect-pixel .zig-cache/shapes/native.png 240 40 127 191 127 255 2 +expect-pixel .zig-cache/shapes/native.png 300 120 255 255 255 255 0 +# The acute zig-zag: one blend at its joins too (no overlap, no hole). +expect-pixel .zig-cache/shapes/native.png 60 228 127 127 255 255 2 +expect-pixel .zig-cache/shapes/native.png 100 372 127 127 255 255 2 +expect-pixel .zig-cache/shapes/native.png 140 228 127 127 255 255 2 +expect-pixel .zig-cache/shapes/native.png 80 300 127 127 255 255 2 +# The ring and its hole. +expect-pixel .zig-cache/shapes/native.png 300 212 175 95 175 255 2 +expect-pixel .zig-cache/shapes/native.png 300 240 255 255 255 255 0 +# A 1 px line on a pixel row: full intensity, one row. +expect-pixel .zig-cache/shapes/native.png 300 300 0 0 0 255 0 +expect-pixel .zig-cache/shapes/native.png 300 299 255 255 255 255 0 +expect-pixel .zig-cache/shapes/native.png 300 301 255 255 255 255 0 +# Many circles, one command each and all in one. +console circles 5000 +frames 2 +console batched 5000 +frames 2 |
