summaryrefslogtreecommitdiff
path: root/Base/res/html/misc/svg.html
blob: 5488b8b178bccc8fc3f8612013c38091925c93ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!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" stroke="blue" 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>