Skip to content

Instantly share code, notes, and snippets.

@wcandillon
Created December 14, 2022 06:23
Show Gist options
  • Save wcandillon/bad5e694fef38265598c0d8fcb8eb683 to your computer and use it in GitHub Desktop.
Save wcandillon/bad5e694fef38265598c0d8fcb8eb683 to your computer and use it in GitHub Desktop.
describe("Drawings", () => {
it("Should blend colors using multiplication", async () => {
const { width, height } = surface;
const r = width * 0.33;
const image = await surface.draw(
<Group blendMode="multiply">
<Circle cx={r} cy={r} r={r} color="cyan" />
<Circle cx={width - r} cy={r} r={r} color="magenta" />
<Circle cx={width / 2} cy={height - r} r={r} color="yellow" />
</Group>
);
checkImage(image, "snapshots/drawings/blend-mode-multiply.png");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment