| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" |
| 3 |
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
| 4 |
<svg width="300px" height="200px" |
| 5 |
viewBox="0 0 1500 1000" preserveAspectRatio="none" |
| 6 |
xmlns="http://www.w3.org/2000/svg" version="1.1"> |
| 7 |
<desc>Example ViewBox - uses the viewBox |
| 8 |
attribute to automatically create an initial user coordinate |
| 9 |
system which causes the graphic to scale to fit into the |
| 10 |
viewport no matter what size the viewport is.</desc> |
| 11 |
|
| 12 |
<!-- This rectangle goes from (0,0) to (1500,1000) in user space. |
| 13 |
Because of the viewBox attribute above, |
| 14 |
the rectangle will end up filling the entire area |
| 15 |
reserved for the SVG content. --> |
| 16 |
<rect x="0" y="0" width="1500" height="1000" |
| 17 |
fill="yellow" stroke="blue" stroke-width="12" /> |
| 18 |
|
| 19 |
<!-- A large, red triangle --> |
| 20 |
<path fill="red" d="M 750,100 L 250,900 L 1250,900 z"/> |
| 21 |
|
| 22 |
<!-- A text string that spans most of the viewport --> |
| 23 |
<text x="100" y="600" font-size="200" font-family="Liberation Sans" > |
| 24 |
Stretch to fit |
| 25 |
</text> |
| 26 |
</svg> |
| 27 |
|