summaryrefslogtreecommitdiff
path: root/librsvg/example-nested-transform.svg
blob: eae4dd8fbe1fd7c0ecaba474ce809bb200c0aa12 (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
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" 
  "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd">
<svg width="400" height="150">
  <!-- Adapted from the example given in section 7.5 of the 3 Mar 2000
	SVG draft -->
  <desc>Example Nested - Nested transformations</desc>
  <g style="fill:none; stroke:black; stroke-width:3">
    <!-- Draw the axes of the original coordinate system -->
    <path d="M0 1.5 L400 1.5"/>
    <path d="M1.5 0 L1.5 150"/>
  </g>
  <!-- First, a translate -->
  <g transform="translate(50,90)">
    <g style="fill:none; stroke:red; stroke-width:3">
      <path d="M0 0 L50 0"/>
      <path d="M0 0 L0 50"/>
    </g>
    <text x="0" y="0" style="font-size:16; font-family:Helvetica">
      ....Translate(1)
    </text>
    <!-- Second, a rotate -->
    <g transform="rotate(-45)">
      <g style="fill:none; stroke:green; stroke-width:3">
        <path d="M0 0 L50 0"/>
        <path d="M0 0 L0 50"/>
      </g>
      <text x="0" y="0" style="font-size:16; font-family:Helvetica">
        ....Rotate(2)
      </text>
      <!-- Third, another translate -->
      <g transform="translate(130,160)">
        <g style="fill:none; stroke:blue; stroke-width:3">
          <path d="M0 0 L50 0"/>
          <path d="M0 0 L0 50"/>
        </g>
        <text x="0" y="0" style="font-size:16; font-family:Helvetica">
          ....Translate(3)
        </text>
      </g>
    </g>
  </g>
</svg>