| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd"> |
| |
| <!-- ========================================================================= --> |
| <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> |
| <!-- --> |
| <!-- This software is published under the terms of the Apache Software License --> |
| <!-- version 1.1, a copy of which has been included with this distribution in --> |
| <!-- the LICENSE file. --> |
| <!-- ========================================================================= --> |
| |
| <!-- ========================================================================= --> |
| <!-- Test percentages and units --> |
| <!-- --> |
| <!-- @author tkormann@apache.org --> |
| <!-- @version $Id$ --> |
| <!-- ========================================================================= --> |
| |
| <?xml-stylesheet type="text/css" href="test.css" ?> |
| |
| |
| <svg id="body" width="450" height="500" viewBox="0 0 450 500"> |
| <title>Test percentages and units</title> |
| <!-- ============================================================= --> |
| <!-- Test content --> |
| <!-- ============================================================= --> |
| <g id="testContent"> |
| <text x="225" y="50" class="title"> |
| Test percentages and units |
| </text> |
| <defs> |
| <pattern id="svgPattern" viewBox="0 0 10 10" x="0" y="0" width="10" height="10" |
| patternContentUnits="userSpaceOnUse" patternUnits="userSpaceOnUse"> |
| <g fill="#eee" stroke="none"> |
| <rect x="0" y="0" width="5" height="5" /> |
| <rect x="5" y="5" width="5" height="5" /> |
| </g> |
| </pattern> |
| </defs> |
| <!-- ============================================================= --> |
| <!-- ============================================================= --> |
| <g transform="translate(175 100)" style="font-size:10; text-anchor:middle"> |
| |
| <g transform="translate(10 20)"> |
| <rect x="0" y="10" width="20" height="80" style="fill:gold"/> |
| <rect x="6.66%" y="2%" width="4.44%" height="16%" style="fill:orange"/> |
| <rect x="15.87mm" y="2.645mm" width="5.26mm" height="21.16mm" style="fill:crimson"/> |
| </g> |
| |
| <text x="20" y="120">px</text> |
| <text x="50" y="120">%</text> |
| <text x="80" y="120">mm</text> |
| <rect x="0" y="0" width="100" height="20" style="stroke:black; fill:#eee"/> |
| <rect x="0" y="20" width="100" height="110" style="stroke:black;fill:none"/> |
| <text x="50" y="14">TopLevel</text> |
| </g> |
| |
| <!-- ============================================================= --> |
| <!-- ============================================================= --> |
| <svg x="55" y="280" width="100" height="110"> |
| |
| <rect x="0%" y="0%" width="100%" height="100%" style="fill:url(#svgPattern)"/> |
| |
| <rect x="10" y="10" width="20" height="80" style="fill:gold"/> |
| <rect x="40%" y="9.09%" width="20%" height="72.72%" style="fill:orange"/> |
| <rect x="18.51mm" y="2.64mm" width="5.29mm" height="21.16mm" style="fill:crimson"/> |
| |
| </svg> |
| |
| <g transform="translate(55 260)" style="font-size:10; text-anchor:middle"> |
| <text x="20" y="120">px</text> |
| <text x="50" y="120">%</text> |
| <text x="80" y="120">mm</text> |
| <rect x="0" y="0" width="100" height="20" style="stroke:black; fill:#eee"/> |
| <rect x="0" y="20" width="100" height="110" style="stroke:black;fill:none"/> |
| <text x="50" y="14">Viewport in px</text> |
| </g> |
| |
| <!-- ============================================================= --> |
| <!-- ============================================================= --> |
| |
| <svg x="38.88%" y="56%" width="22.22%" height="22%"> |
| |
| <rect x="0%" y="0%" width="100%" height="100%" style="fill:url(#svgPattern)"/> |
| |
| <rect x="10" y="10" width="20" height="80" style="fill:gold"/> |
| <rect x="40%" y="9.09%" width="20%" height="72.72%" style="fill:orange"/> |
| <rect x="18.51mm" y="2.64mm" width="5.29mm" height="21.16mm" style="fill:crimson"/> |
| |
| </svg> |
| |
| <g transform="translate(175 260)" style="font-size:10; text-anchor:middle"> |
| <text x="20" y="120">px</text> |
| <text x="50" y="120">%</text> |
| <text x="80" y="120">mm</text> |
| <rect x="0" y="0" width="100" height="20" style="stroke:black; fill:#eee"/> |
| <rect x="0" y="20" width="100" height="110" style="stroke:black;fill:none"/> |
| <text x="50" y="14">Viewport in %</text> |
| </g> |
| |
| <!-- ============================================================= --> |
| <!-- ============================================================= --> |
| |
| <svg x="78.02mm" y="74.06mm" width="26.45mm" height="29.09mm"> |
| |
| <rect x="0%" y="0%" width="100%" height="100%" style="fill:url(#svgPattern)"/> |
| |
| <rect x="10" y="10" width="20" height="80" style="fill:gold"/> |
| <rect x="40%" y="9.09%" width="20%" height="72.72%" style="fill:orange"/> |
| <rect x="18.51mm" y="2.64mm" width="5.29mm" height="21.16mm" style="fill:crimson"/> |
| |
| </svg> |
| |
| <g transform="translate(295 260)" style="font-size:10; text-anchor:middle"> |
| <text x="20" y="120">px</text> |
| <text x="50" y="120">%</text> |
| <text x="80" y="120">mm</text> |
| <rect x="0" y="0" width="100" height="20" style="stroke:black; fill:#eee"/> |
| <rect x="0" y="20" width="100" height="110" style="stroke:black;fill:none"/> |
| <text x="50" y="14">Viewport in mm</text> |
| </g> |
| |
| </g> |
| |
| <!-- ============================================================= --> |
| <!-- Batik sample mark --> |
| <!-- ============================================================= --> |
| <use xlink:href="../batikLogo.svg#Batik_Tag_Box" /> |
| |
| </svg> |