Last active
December 14, 2021 09:45
-
-
Save macrat/03946eb8311d5b1adb47417918b70855 to your computer and use it in GitHub Desktop.
Image XOR in SVG.
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
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"> | |
<defs> | |
<path id="a" d="M0,0 L0,10 10,0" /> | |
<text id="b" font-size="4" y="7">hello</text> | |
<clipPath id="aclip"> | |
<use href="#a" /> | |
</clipPath> | |
</defs> | |
<use href="#a" /> | |
<use href="#b" /> | |
<use href="#b" clip-path="url(#aclip)" fill="white" /> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment