blob: bf00b6cac94297a5fe8b5c98a08935fa52127f04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?xml version="1.0" standalone="yes"?>
<svg:svg width="4in" height="3in" xmlns:svg="http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
<svg:title>Units</svg:title>
<svg:desc>Demonstration of coordinate transforms
</svg:desc>
<!-- The following two text elements will both draw with a
font height of 12 pixels -->
<svg:text x="10" y="20" style="font-size: 12">This prints 12 pixels high.</svg:text>
<svg:text x="10" y="40" style="font-size: 12px">This prints 12 pixels high.</svg:text>
<!-- Now scale the coordinate system by 2. -->
<svg:g transform="scale(2)">
<!-- The following text will actually draw 24 pixels high
because each unit in the new coordinate system equals
2 units in the previous coordinate system. -->
<svg:text x="5" y="40" style="font-size: 12">This prints 24 pixels high.</svg:text>
<!-- The following text will actually still draw 12 pixels high
because the CSS unit specifier has been provided. -->
<svg:text x="5" y="50" style="font-size: 12px">This prints 12 pixels high.</svg:text>
</svg:g>
</svg:svg>
|