Skip to content

Commit f262a76

Browse files
authored
adopt globalCompositeOperation, test the color converter cache for opacity (#2418)
1 parent 7df1c3d commit f262a76

2 files changed

Lines changed: 80 additions & 0 deletions

File tree

test/output/rasterMixedOpacity.svg

Lines changed: 67 additions & 0 deletions
Loading

test/plots/raster-precision.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,16 @@ test(async function rasterFacet() {
3939
]
4040
});
4141
});
42+
43+
test(async function rasterMixedOpacity() {
44+
return Plot.plot({
45+
marks: [
46+
Plot.raster({
47+
width: 4,
48+
height: 10,
49+
imageRendering: "pixelated",
50+
fill: (x: number, y: number) => (x < 2 ? d3.schemeObservable10[y | 0] : `rgba(128, 128, 128, ${y / 10})`)
51+
})
52+
]
53+
});
54+
});

0 commit comments

Comments
 (0)