hpi-swa-teaching / SVGMorph

(SWT22-04)
MIT License
5 stars 2 forks source link

gradientTransforms not working properly #76

Open dasGoogle opened 2 years ago

dasGoogle commented 2 years ago

As a viewer, I expect transformations on gradients to be displayed correctly.

Currently, when rendering the SVG

<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <linearGradient id="myGradient" gradientTransform="rotate(90)">
      <stop offset="5%"  stop-color="gold" />
      <stop offset="95%" stop-color="red" />
    </linearGradient>
  </defs>

  <!-- using my linear gradient -->
  <rect x="0" y="0" width="200" height="200" fill="url(#myGradient)" />
</svg>

in SVGMorph this displays as image

when it should be displayed like this: image