mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
We don't discern between opaque and non-opaque alpha types in LibGfx, which at some point we might need to do. But for now, assume all opaque Skia surfaces have premultiplied alpha. Fixes #6892.
11 lines
394 B
HTML
11 lines
394 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const ctx = document.createElement("canvas").getContext("2d", {alpha: false});
|
|
ctx.fillStyle = "rgba(100, 150, 200, 0.5)";
|
|
ctx.fillRect(0, 0, 300, 150);
|
|
const color = ctx.getImageData(0, 0, 300, 150);
|
|
println(`${color.data[0]}, ${color.data[1]}, ${color.data[2]}, ${color.data[3]}`);
|
|
});
|
|
</script>
|