1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:37:35 +00:00

LibWeb: Add SVG <polygon> element and test case :^)

This commit is contained in:
Sam Atkins 2022-02-11 17:36:05 +00:00 committed by Andreas Kling
parent 116a1f485c
commit 2fad940b0b
10 changed files with 114 additions and 1 deletions

View file

@ -11,7 +11,7 @@
</style>
</head>
<body>
<svg width="800" height="1000">
<svg width="800" height="1200">
<path d="M 10 10 h 100 l -50 80 z" fill="green" stroke="black" stroke-width="3"></path>
<path d="M 60 10 h 100 l -50 80 z" fill="red" stroke="blue" stroke-width="3"></path>
<path d="M 110 10 h 100 l -50 80 z" class="css"></path>
@ -75,6 +75,15 @@
375,850 375,750 425,750 425,850
475,850 475,725 525,725 525,850
575,850" />
<!-- Based on https://svgwg.org/svg2-draft/shapes.html#PolygonElement -->
<polygon fill="red" stroke="blue" stroke-width="10"
points="150,875 179,961 269,961 197,1015
223,1101 150,1050 77,1101 103,1015
31,961 121,961" />
<polygon fill="lime" stroke="blue" stroke-width="10"
points="450,875 558,937.5 558,1062.5
450,1125 342,1062.6 342,937.5" />
</svg>
</body>
</html>