summaryrefslogtreecommitdiff
path: root/test/shapes.script
blob: 3111d5cde880f99db41f4f39b9d4744b602a71f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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