Created
October 23, 2017 20:39
-
-
Save BenjaminVerble/643de7d5ed5f35edce7d7752692d8101 to your computer and use it in GitHub Desktop.
print from chrome to see bad rasterization of svg pattern
This file contains hidden or 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
| <html> | |
| <body> | |
| <svg width="120" height="120" viewBox="0 0 120 120" | |
| xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <pattern id="Triangle" width="10" height="10" | |
| patternUnits="userSpaceOnUse"> | |
| <polygon points="5,0 10,10 0,10"/> | |
| </pattern> | |
| </defs> | |
| <circle cx="60" cy="60" r="50" fill="url(#Triangle)"/> | |
| </svg> | |
| </body> | |
| </html> |
Damn, I've wrestled with this for hours and found randomly this gist when I changed my Google search to include "rasterisation" instead of "blurry".
Can verify that this still is an issue in Chrome 85 and setting opacity to 0.99 fixes it, if anyone else comes across this gist.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setting the opacity of the element to
0.99solves the bug, tested with Chrome 79 and inline SVG.Source: https://stackoverflow.com/a/45911373/4417327