coords-units-03-b-isvalid.html (6587B)
1 <!DOCTYPE html> 2 <html lang='en'> 3 <head> 4 <title>coords-units-03-b-manual.svg</title> 5 <meta charset='utf-8'> 6 </head> 7 <body> 8 <h1>Source SVG: coords-units-03-b-manual.svg</h1> 9 <svg version="1.1" baseProfile="basic" id="svg-root" 10 width="100%" height="100%" viewBox="0 0 480 360" 11 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 12 <!--======================================================================--> 13 <!--= SVG 1.1 2nd Edition Test Case =--> 14 <!--======================================================================--> 15 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =--> 16 <!--= Institute of Technology, European Research Consortium for =--> 17 <!--= Informatics and Mathematics (ERCIM), Keio University). =--> 18 <!--= All Rights Reserved. =--> 19 <!--= See http://www.w3.org/Consortium/Legal/. =--> 20 <!--======================================================================--> 21 22 <title id="test-title">$RCSfile: coords-units-03-b.svg,v $</title> 23 <defs> 24 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> 25 <font-face-src> 26 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> 27 </font-face-src> 28 </font-face> 29 </defs> 30 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> 31 <g id="viewport-initial-size-test"> 32 <!-- ====================================================================== --> 33 <!-- First fill a rectangle that is bigger than the defined viewport ====== --> 34 <!-- ====================================================================== --> 35 <rect x="0px" y="0px" width="2000px" height="2000px" fill="red"/> 36 <!-- ====================================================================== --> 37 <!-- This second rectangle should cover the previous one, so none of the == --> 38 <!-- red should show if the initial viewport has the requested size == --> 39 <!-- ====================================================================== --> 40 <rect x="0px" y="0px" width="480px" height="360px" fill="white"/> 41 </g> 42 <!-- viewport-initial-size-test --> 43 <!-- Title --> 44 <text x="125" y="20" fill="black" font-size="12" font-family="Arial">Initial viewport and CSS units test</text> 45 <g id="units-test" fill="black" font-size="10pt" transform="translate(0, 60)"> 46 <!-- ====================================================================== --> 47 <!-- Now, draw rectangles using the various unit specifiers --> 48 <!-- ====================================================================== --> 49 <!-- User Space --> 50 <text x="20" y="18">200</text> 51 <text x="230" y="20">User space units (no specifier)</text> 52 <rect x="20" y="20" width="200" height="1"/> 53 <!-- ================== --> 54 <!-- Relative CSS Units --> 55 <!-- ================== --> 56 <!-- Pixels : Should correspond to User Space, because the initial user --> 57 <!-- coordinate is such that one user space unit equals one pixel in --> 58 <!-- viewport. --> 59 <text x="20" y="38">200 px</text> 60 <text x="230" y="40">Pixels (px)</text> 61 <rect x="20" y="40" width="200px" height="1"/> 62 <!-- Font size (em). Should be equal to 200pt because current font's --> 63 <!-- point size is 10pt --> 64 <text x="20" y="58">20 em = 200 px (font-size=10px)</text> 65 <text x="230" y="60">Relative to font size (em)</text> 66 <g font-size="10px"> 67 <rect x="20" y="60" width="20em" height="1"/> 68 </g> 69 <!-- X-Height (ex). With a 10px font-size, x-height is about 5px, so --> 70 <!-- ex units would be about 200px --> 71 <text x="20" y="78">40 ex</text> 72 <text x="230" y="80">Relative to font x-height (ex)</text> 73 <g font-size="10px"> 74 <rect x="20" y="80" width="40ex" height="1"/> 75 </g> 76 <!-- ========================= --> 77 <!-- Percentage --> 78 <!-- ========================= --> 79 <!-- 1% = 4.8px because viewport is 480px --> 80 <text x="20" y="98">41.67% = 200 px</text> 81 <text x="230" y="100">Percentage (%)</text> 82 <rect x="20" y="100" width="41.67%" height="1"/> 83 <!-- ========================= --> 84 <!-- Absolute Length CSS Units --> 85 <!-- ========================= --> 86 <!-- Inches (should be the same length as following (cm) rect) --> 87 <text x="20" y="118">1 in</text> 88 <text x="230" y="120">Inches (in)</text> 89 <rect x="20" y="120" width="1in" height="1"/> 90 <!-- Centimeters(should be the same length as previous (in) rect) --> 91 <!-- 1in = 2.54cm --> 92 <text x="20" y="138">2.54 cm = 1 in</text> 93 <text x="230" y="140">Centimeters (cm)</text> 94 <rect x="20" y="140" width="2.54cm" height="1"/> 95 <!-- Millimeters (should be the same length as previous (cm) rect) --> 96 <!-- 10mm = 1cm --> 97 <text x="20" y="158">25.4 mm = 1 in</text> 98 <text x="230" y="160">Millimeters (mm)</text> 99 <rect x="20" y="160" width="25.4mm" height="1"/> 100 <!-- Points (should be the same length as (in) rect --> 101 <!-- 1pt = 1/72 in --> 102 <text x="20" y="178">72pt = 1 in</text> 103 <text x="230" y="180">Points (pt)</text> 104 <rect x="20" y="180" width="72pt" height="1"/> 105 <!-- Picas (should be the same length as previous (pt) rect) --> 106 <!-- 1pc = 12pt --> 107 <text x="20" y="198">6pc = 1 in</text> 108 <text x="230" y="200">Picas (pc)</text> 109 <rect x="20" y="200" width="6pc" height="1"/> 110 </g> 111 <!-- units-test --> 112 </g> 113 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> 114 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text> 115 </g> 116 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> 117 <!-- comment out this watermark once the test is approved --> 118 <!--<g id="draft-watermark"> 119 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> 120 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 121 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> 122 </g>--> 123 </svg> 124 </body> 125 </html>