Files
ladybird/Tests/LibWeb/Screenshot/input/svg-gradient-paint-transformation.html
Jelle Raaijmakers e5d71a6c82 LibWeb: Apply the paint transformation in SVGGradientElement
In commit 1b82cb43c2 I accidentally
removed the paint transformation altogether. The result was that
zoomed-in SVGs, or SVG elements with a transformation applied could have
their gradient coordinates misplaced significantly.

This was also exposed in the `svg-text-effects` test by way of a slight
visual difference. Add a new test that very clearly exposes the fixed
issue by rotating the gradient coordinates by 45 degrees.
2024-11-15 23:21:13 +01:00

14 lines
488 B
HTML

<link rel="match" href="../expected/svg-gradient-paint-transformation-ref.html" />
<svg height="150" width="150" xmlns="http://www.w3.org/2000/svg">
<style>
.hi {
font: bold 70px sans-serif;
}
</style>
<linearGradient id="gradient">
<stop offset="0%" stop-color="rgba(255, 0, 0, 1)"/>
<stop offset="100%" stop-color="rgba(0, 255, 0, 1)"/>
</linearGradient>
<text x="50" y="50" class="hi" fill="url(#gradient)" transform="rotate(45 50 50)">HI</text>
</svg>