| 1 |
<svg version="1.1" baseProfile="tiny" id="svg-root" |
| 2 |
width="100%" height="100%" viewBox="0 0 480 360" |
| 3 |
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= SVG 1.1 2nd Edition Test Case =--> |
| 6 |
<!--======================================================================--> |
| 7 |
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =--> |
| 8 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 9 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 10 |
<!--= All Rights Reserved. =--> |
| 11 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 12 |
<!--======================================================================--> |
| 13 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 14 |
template-version="1.4" reviewer="SVGWG" author="Lofton Henderson" status="accepted" |
| 15 |
version="$Revision: 1.7 $" testname="$RCSfile: paths-data-02-t.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/paths.html#PathData"> |
| 17 |
<p> |
| 18 |
Test that the viewer has the basic capability to handle the 'path' |
| 19 |
element and its data (d) attribute in combination with the quadratic |
| 20 |
Bezier curveto commands, Q, q, T, t (plus Mm and Zz). |
| 21 |
</p> |
| 22 |
<p> |
| 23 |
There are 7 subtests, each composed from the quadric Bezier path commands per |
| 24 |
the label by the subtest. On-curve control points (i.e., the curve position) |
| 25 |
are marked by small colored squares. Subtests are filled, or stroked, or |
| 26 |
both, using simple style properties and colors. |
| 27 |
</p> |
| 28 |
</d:testDescription> |
| 29 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 30 |
<p> |
| 31 |
Run the test. No interaction required. |
| 32 |
</p> |
| 33 |
</d:operatorScript> |
| 34 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 35 |
<p> |
| 36 |
The rendered picture should match the reference image exactly |
| 37 |
</p> |
| 38 |
</d:passCriteria> |
| 39 |
</d:SVGTestCase> |
| 40 |
<title id="test-title">$RCSfile: paths-data-02-t.svg,v $</title> |
| 41 |
<defs> |
| 42 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 43 |
<font-face-src> |
| 44 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 45 |
</font-face-src> |
| 46 |
</font-face> |
| 47 |
</defs> |
| 48 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 49 |
<text font-size="12" x="120" y="14">Quadric bezier curves drawn with commands:</text> |
| 50 |
<!-- ====================================================================== --> |
| 51 |
<!-- Quad Bezier with sub-path using M, Q, M, q, & z ====================== --> |
| 52 |
<!-- ====================================================================== --> |
| 53 |
<path id="Bez_MQMqz" fill="none" stroke="#0000FF" stroke-width="3" d="M 15 20 Q 30 120 130 30 M 180 80 q -75 -100 -163 -60z"/> |
| 54 |
<text font-size="12" x="80" y="86">M, Q, M, q, z</text> |
| 55 |
<rect x="13" y="18" width="4" height="4" fill="#00C000" stroke="none"/> |
| 56 |
<rect x="128" y="28" width="4" height="4" fill="#00C000" stroke="none"/> |
| 57 |
<rect x="178" y="78" width="4" height="4" fill="#00C000" stroke="none"/> |
| 58 |
<rect x="15" y="18" width="4" height="4" fill="#00C000" stroke="none"/> |
| 59 |
<!-- ====================================================================== --> |
| 60 |
<!-- Quad Bezier with sub-path using m, q, z, m, q, & z =================== --> |
| 61 |
<!-- ====================================================================== --> |
| 62 |
<path id="Bez_fill_MQzmqz" fill="#FFFF00" stroke="#0000CF" d="M372 130Q272 50 422 10zm70 0q50-150-80-90z"/> |
| 63 |
<text font-size="12" x="352" y="150">m, q, z, m, q, z</text> |
| 64 |
<rect x="370" y="128" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 65 |
<rect x="420" y="8" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 66 |
<rect x="440" y="128" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 67 |
<rect x="360" y="38" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 68 |
<!-- ====================================================================== --> |
| 69 |
<!-- Simple Bezier using M, Q, & Z ======================================== --> |
| 70 |
<!-- ====================================================================== --> |
| 71 |
<path id="Bez_stroke_MQz" fill="none" stroke="#00FFFF" d="M224 103Q234 -12 304 33Z"/> |
| 72 |
<text font-size="12" x="192" y="36">M, Q, Z</text> |
| 73 |
<rect x="222" y="101" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 74 |
<rect x="302" y="31" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 75 |
<!-- ====================================================================== --> |
| 76 |
<!-- Tri Bezier using M, Q, T, Q, & z ===================================== --> |
| 77 |
<!-- ====================================================================== --> |
| 78 |
<path id="Tri_MQTQz" fill="#00C000" stroke="#000000" d="M208 168Q258 268 308 168T258 118Q128 88 208 168z"/> |
| 79 |
<text font-size="12" x="308" y="188">M, Q, T, Q, z</text> |
| 80 |
<rect x="206" y="166" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 81 |
<rect x="306" y="166" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 82 |
<rect x="256" y="116" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 83 |
<rect x="206" y="206" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 84 |
<!-- ====================================================================== --> |
| 85 |
<!-- Double Bezier using M, Q, Q, & z ===================================== --> |
| 86 |
<!-- ====================================================================== --> |
| 87 |
<path id="Inv_V_MCcZ" fill="#00CF00" stroke="none" d=" M 60 100 Q -40 150 60 200 Q 160 150 60 100 z "/> |
| 88 |
<text font-size="12" x="80" y="200">M, Q, Q, z</text> |
| 89 |
<rect x="58" y="98" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 90 |
<rect x="58" y="198" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 91 |
<rect x="58" y="98" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 92 |
<!-- ====================================================================== --> |
| 93 |
<!-- Sin Wave using M, q, t, t, t, t, & z ================================ --> |
| 94 |
<!-- ====================================================================== --> |
| 95 |
<path id="Sin_Mqttttz" fill="none" stroke="#40DD20" d="M240 296q25-100 47 0t47 0t47 0t47 0t47 0z"/> |
| 96 |
<text font-size="12" x="380" y="236">M, q, t, t, t, t, z</text> |
| 97 |
<rect x="238" y="294" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 98 |
<rect x="285" y="294" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 99 |
<rect x="332" y="294" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 100 |
<rect x="379" y="294" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 101 |
<rect x="426" y="294" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 102 |
<rect x="473" y="294" width="4" height="4" fill="#0000FF" stroke="none"/> |
| 103 |
<!-- ====================================================================== --> |
| 104 |
<!-- Double Spade using M, q, Q, q, Q, & z ================================ --> |
| 105 |
<!-- ====================================================================== --> |
| 106 |
<path id="Dbl_spd_MCcZ" fill="#0000C0" stroke="#00CF00" stroke-width="2" d="M172 193q-100 50 0 50Q72 243 172 293q100 -50 0 -50Q272 243 172 193z"/> |
| 107 |
<text font-size="12" x="48" y="280">M, q, Q, q, Q, z</text> |
| 108 |
<rect x="170" y="191" width="4" height="4" fill="#40DD20" stroke="none"/> |
| 109 |
<rect x="170" y="241" width="4" height="4" fill="#40DD20" stroke="none"/> |
| 110 |
<rect x="170" y="291" width="4" height="4" fill="#40DD20" stroke="none"/> |
| 111 |
<rect x="170" y="241" width="4" height="4" fill="#40DD20" stroke="none"/> |
| 112 |
<rect x="170" y="191" width="4" height="4" fill="#40DD20" stroke="none"/> |
| 113 |
</g> |
| 114 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 115 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text> |
| 116 |
</g> |
| 117 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 118 |
<!-- comment out this watermark once the test is approved --> |
| 119 |
<!--<g id="draft-watermark"> |
| 120 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 121 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 122 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 123 |
</g>--> |
| 124 |
</svg> |