Created
December 14, 2022 06:23
-
-
Save wcandillon/bad5e694fef38265598c0d8fcb8eb683 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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