ladybird/Base/res/html/misc/svg.html

89 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>SVG test</title>
<style>
.css {
fill: magenta;
stroke: yellow;
stroke-width: 3;
}
</style>
</head>
<body>
<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" fill-opacity="50%" stroke="blue" stroke-opacity="50%" stroke-width="3"></path>
<path d="M 110 10 h 100 l -50 80 z" class="css"></path>
<path d="M 135 275 v -100 a 100,100 0 0,0 -100,100 z" fill="yellow" stroke="blue" stroke-width="3"></path>
<path d="M 150 290 v -100 a 100,100 0 1,1 -100,100 z" fill="red" stroke="blue" stroke-width="3"></path>
<path d="M 300,20 l 30,10
a 10,10 20 0,1 30,10 l 30,10
a 10,20 20 0,1 30,10 l 30,10
a 10,30 20 0,1 30,10 l 30,10
a 10,40 20 0,1 30,10 l 30,10"
fill="none" stroke="red" stroke-width="5"></path>
<path d="M 300,160 l 30,10
a 10,10 20 0,1 30,10 l 30,10
a 10,20 20 0,1 30,10 l 30,10
a 10,30 20 0,1 30,10 l 30,10
a 10,40 20 0,1 30,10 l 30,10"
fill="orange" stroke="red" stroke-width="5"></path>
<g fill="orange" stroke="red" stroke-width="5">
<path d="M 300,300 l 30,10
a 10,10 20 0,1 30,10 l 30,10
a 10,20 20 0,1 30,10 l 30,10
a 10,30 20 0,1 30,10 l 30,10
a 10,40 20 0,1 30,10 l 30,10 z"></path>
</g>
<!-- Based on https://svgwg.org/svg2-draft/shapes.html#RectElement -->
<rect x="50" y="420" width="120" height="60" fill="yellow" stroke="navy" stroke-width="3" />
<rect x="250" y="420" width="120" height="60" rx="15" fill="green" />
<g transform="translate(450 450) rotate(-30)">
<rect x="0" y="0" width="120" height="60" rx="15" fill="none" stroke="purple" stroke-width="9" />
</g>
<!-- Based on https://svgwg.org/svg2-draft/shapes.html#CircleElement -->
<circle cx="100" cy="550" r="40" fill="red" stroke="blue" stroke-width="4" />
<!-- Based on https://svgwg.org/svg2-draft/shapes.html#EllipseElement -->
<ellipse cx="250" cy="550" rx="50" ry="20" fill="red" />
<g transform="translate(400 550) rotate(-30)">
<ellipse rx="50" ry="20" fill="none" stroke="blue" stroke-width="4" />
</g>
<!-- Based on https://svgwg.org/svg2-draft/shapes.html#LineElement -->
<g stroke="green">
<line x1="10" y1="700" x2="110" y2="600" stroke-width="5" />
<line x1="120" y1="700" x2="220" y2="600" stroke-width="10" />
<line x1="230" y1="700" x2="330" y2="600" stroke-width="15" />
<line x1="340" y1="700" x2="440" y2="600" stroke-width="20" />
<line x1="450" y1="700" x2="550" y2="600" stroke-width="25" />
</g>
<!-- Based on https://svgwg.org/svg2-draft/shapes.html#PolylineElement -->
<polyline fill="none" stroke="blue" stroke-width="5"
points="25,850
75,850 75,825 125,825 125,850
175,850 175,800 225,800 225,850
275,850 275,775 325,775 325,850
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>