blob: 66fa3bccf29810fe23d60f00127e6fc99a09a320 (
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
|
<?xml version="1.0" standalone="yes"?>
<svg:svg width="400px" height="120px" xmlns:svg="http://www.w3.org/TR/2000/WD-SVG-20000629/DTD/svg-20000629.dtd">
<svg:title>RotateScale</svg:title>
<svg:desc>Example RotateScale - Rotate and scale transforms</svg:desc>
<svg:g style="fill:none; stroke:black; stroke-width:3">
<!-- Draw the axes of the original coordinate system -->
<svg:line x1="0" y1="1.5" x2="400" y2="1.5" />
<svg:line x1="1.5" y1="0" x2="1.5" y2="120" />
</svg:g>
<!-- Establish a new coordinate system whose origin is at (50,30)
in the initial coord. system and which is rotated by 30 degrees. -->
<svg:g transform="translate(50,30)">
<svg:g transform="rotate(30)">
<svg:g style="fill:none; stroke:red; stroke-width:3">
<svg:line x1="0" y1="0" x2="50" y2="0" />
<svg:line x1="0" y1="0" x2="0" y2="50" />
</svg:g>
<svg:text x="0" y="0" style="font-size:20; font-family:Verdana; fill:blue">
ABC (rotate)
</svg:text>
</svg:g>
</svg:g>
<!-- Establish a new coordinate system whose origin is at (200,40)
in the initial coord. system and which is scaled by 1.5. -->
<svg:g transform="translate(200,40)">
<svg:g transform="scale(1.5)">
<svg:g style="fill:none; stroke:red; stroke-width:3">
<svg:line x1="0" y1="0" x2="50" y2="0" />
<svg:line x1="0" y1="0" x2="0" y2="50" />
</svg:g>
<svg:text x="0" y="0" style="font-size:20; font-family:Verdana; fill:blue">
ABC (scale)
</svg:text>
</svg:g>
</svg:g>
</svg:svg>
|