1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

LibWeb: Fix end position for objectBoundingBox SVG <radialGradient>s

The translation to the bounding box location is handled by the gradient
transform, also doing it here breaks things.

This fixes the MDN <radialGradient> example.
This commit is contained in:
MacDue 2023-06-17 19:25:54 +01:00 committed by Sam Atkins
parent 57626c4f9a
commit a910c4d984
2 changed files with 20 additions and 4 deletions

View file

@ -31,6 +31,24 @@
</svg>
<br>
<br>
<b>MDN radialGradient example (gradientUnits=objectBoundingBox)</b>
<br>
<svg width="200" height="200"
viewBox="0 0 10 10"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<radialGradient id="myGradient">
<stop offset="10%" stop-color="gold" />
<stop offset="95%" stop-color="red" />
</radialGradient>
</defs>
<!-- using my radial gradient -->
<circle cx="5" cy="5" r="4" fill="url('#myGradient')" />
</svg>
<br>
<br>
<b>Simple radialGradient gradientUnits=objectBoundingBox</b><br>
<svg height="150" width="500">
<defs>