This SVG does not render correctly in canvg
See original GitHub issueI used the canvg test page on this svg string:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="Layer_1" viewBox="600 400 1200 1300" height="32px" width="19px">
<defs><pattern id="multiband" width="1" height="3" patternContentUnits="objectBoundingBox"><path fill="#ff0000" d="M 0.5 0.31666666666666665 L 0.5 0.95 A 1 0.6333333333333333 0 0 0 1.3660254037844388 1.4062824978585316e-16 Z" /><path fill="#00ff00" d="M 0.5 0.31666666666666665 L 1.3660254037844388 1.4062824978585316e-16 A 1 0.6333333333333333 0 0 0 -0.3660254037844385 -2.812564995717063e-16 Z" /><path fill="#0000ff" d="M 0.5 0.31666666666666665 L -0.3660254037844385 -2.812564995717063e-16 A 1 0.6333333333333333 0 0 0 0.4999999999999998 0.95 Z" /></pattern></defs>
<g id="svg_1">
<path fill-rule="evenodd" clip-rule="evenodd" fill="url(#multiband)" stroke="#000000" stroke-width="90" stroke-miterlimit="10" d="m1174.939941,1873.629028c-38.765869,-190.301025 -107.115967,-348.665039 -189.902954,-495.439941c-61.406982,-108.87207 -132.543945,-209.363037 -198.364014,-314.937988c-21.971985,-35.244019 -40.93396,-72.477051 -62.046997,-109.054077c-42.215942,-73.136963 -76.44397,-157.934998 -74.268982,-267.932007c2.125,-107.472961 33.208008,-193.68399 78.029968,-264.171997c73.719055,-115.934967 197.20105,-210.988983 362.884033,-235.968979c135.466064,-20.423996 262.475098,14.082001 352.542969,66.748001c73.600098,43.037994 130.596069,100.527008 173.920044,168.279999c45.219971,70.716003 76.359009,154.26001 78.970947,263.231995c1.337036,55.830017 -7.804932,107.531982 -20.68396,150.417969c-13.033936,43.409058 -33.995972,79.695007 -52.645996,118.454041c-36.406006,75.658997 -82.04895,144.981995 -127.85498,214.346008c-136.437012,206.605957 -264.496094,417.309937 -320.580078,706.026978z" id="svg_2"/>
</g></svg>
This is the difference:
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
SVG Image not converted properly to Canvas using canvg
Pass the canvas element to canvg svg = $('svg').parent().html() canvas = document.getElementById("canvas") canvg(canvas, svg) img_PNG ...
Read more >How to draw SVG image on canvas with Konva
Option 3: Use an external library to render SVG to canvas. Use an external library (for example, canvg) to draw the SVG into...
Read more >Automatic Translation of Interactive SVGs to a Multithread ...
This does not increase performance as more work must be completed. Other projects, such as canvg [25], render SVG elements individually in a...
Read more >canvg - Bountysource
Both are identical except that #c1 has canvg rendering an svg with ... Hello I having issues trying to get text to render...
Read more >Newest 'canvg' Questions - Stack Overflow
SVG is not correctly rendered with canvg. I need to convert svg to png and I'm using currently canvg to do this. But...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
that smaller example helps … if you remove
x="-14.4" y="-14.4"
from thepattern
it begins working, although it’s not the right opacity so there’s a bug w/fill-opacity
.so current bugs for this issue are:
fill-opacity
does not work when there are patternsbut we made some progress!
The
fill-opacity
also doesn’t work with gradients. I have not tested masks, but i presume this issue will be with any fill urlIt can, for now, be resolved using
stop-opacity
or usingrgba
values instead.