| 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-01-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 cubic |
| 20 |
Bezier curveto commands, C, c, S, s (plus Mm and Zz). |
| 21 |
</p> |
| 22 |
<p> |
| 23 |
There are 8 subtests, each composed from the cubic Bezier path commands per |
| 24 |
the label by the subtest. On-curve control points (i.e., the curve position) |
| 25 |
are marked by small blue 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-01-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 |
<!-- ====================================================================== --> |
| 50 |
<!-- First Curve "X" that has subpath utilizing M, C, S, m, c, & s ======== --> |
| 51 |
<!-- ====================================================================== --> |
| 52 |
<text font-size="12" x="100" y="14">Cubic bezier curves drawn with commands:</text> |
| 53 |
<path id="X_curve_MCSmcs" fill="#00FF00" stroke="#00C000" d=" M 210 130 C 145 130 110 80 110 80 S 75 25 10 25 m 0 105 c 65 0 100 -50 100 -50 s 35 -55 100 -55 "/> |
| 54 |
<!-- ====================================================================== --> |
| 55 |
<!-- Markers for path control points ===================================== --> |
| 56 |
<!-- ====================================================================== --> |
| 57 |
<rect x="208" y="128" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 58 |
<rect x="108" y="78" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 59 |
<rect x="8" y="23" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 60 |
<rect x="8" y="128" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 61 |
<rect x="108" y="78" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 62 |
<rect x="208" y="23" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 63 |
<text font-size="12" x="5" y="82">M, C, S, m, c, s</text> |
| 64 |
<!-- ====================================================================== --> |
| 65 |
<!-- Infinity using M, c, c, c, C & z ===================================== --> |
| 66 |
<!-- ====================================================================== --> |
| 67 |
<path id="Infinity_McccCz" fill="none" stroke="#000000" d=" M 240 90 c 0 30 7 50 50 0 c 43 -50 50 -30 50 0 c 0 83 -68 -34 -90 -30 C 240 60 240 90 240 90 z "/> |
| 68 |
<!-- ====================================================================== --> |
| 69 |
<!-- Markers for path control points ====================================== --> |
| 70 |
<!-- ====================================================================== --> |
| 71 |
<rect x="238" y="88" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 72 |
<rect x="288" y="88" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 73 |
<rect x="338" y="88" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 74 |
<rect x="248" y="58" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 75 |
<text font-size="12" x="253" y="50">M, c, c, c, C, z</text> |
| 76 |
<!-- ====================================================================== --> |
| 77 |
<!-- Horizontal line utilizing M, C & Z =================================== --> |
| 78 |
<!-- ====================================================================== --> |
| 79 |
<path id="Line_MCZ" fill="none" stroke="#000000" d="M80 170 C100 170 160 170 180 170Z"/> |
| 80 |
<!-- ====================================================================== --> |
| 81 |
<!-- Markers for path control points ====================================== --> |
| 82 |
<!-- ====================================================================== --> |
| 83 |
<rect x="78" y="168" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 84 |
<rect x="178" y="168" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 85 |
<text font-size="12" x="110" y="190">M, C, Z</text> |
| 86 |
<!-- ====================================================================== --> |
| 87 |
<!-- Inverted V using M, C, c & Z ========================================= --> |
| 88 |
<!-- ====================================================================== --> |
| 89 |
<path id="Inv_V_MCcZ" fill="#00C000" stroke="none" d="M5 260 C40 260 60 175 55 160 c -5 15 15 100 50 100Z"/> |
| 90 |
<!-- ====================================================================== --> |
| 91 |
<!-- Markers for path control points ====================================== --> |
| 92 |
<!-- ====================================================================== --> |
| 93 |
<rect x="3" y="258" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 94 |
<rect x="53" y="158" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 95 |
<rect x="103" y="258" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 96 |
<text font-size="12" x="85" y="220">M, C, c, Z</text> |
| 97 |
<!-- ====================================================================== --> |
| 98 |
<!-- Remembrance Ribbon using m, c & s ==================================== --> |
| 99 |
<!-- ====================================================================== --> |
| 100 |
<path id="Rem_Rib_mcs" fill="none" stroke="#000000" d="m 200 260 c 50 -40 50 -100 25 -100 s -25 60 25 100 "/> |
| 101 |
<!-- ====================================================================== --> |
| 102 |
<!-- Markers for path control points ====================================== --> |
| 103 |
<!-- ====================================================================== --> |
| 104 |
<rect x="198" y="258" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 105 |
<rect x="223" y="158" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 106 |
<rect x="248" y="258" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 107 |
<text font-size="12" x="165" y="210">m, c, s</text> |
| 108 |
<!-- ====================================================================== --> |
| 109 |
<!-- 90 degree arc using M & C ============================================ --> |
| 110 |
<!-- ====================================================================== --> |
| 111 |
<path id="Arc_MC" fill="#0000FF" stroke="#000000" d=" M 360 100 C 420 90 460 140 450 190"/> |
| 112 |
<!-- ====================================================================== --> |
| 113 |
<!-- Markers for path control points ====================================== --> |
| 114 |
<!-- ====================================================================== --> |
| 115 |
<rect x="358" y="98" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 116 |
<rect x="448" y="188" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 117 |
<text font-size="12" x="360" y="150">M, C</text> |
| 118 |
<!-- ====================================================================== --> |
| 119 |
<!-- Circle using M, c, s, s, s & z ======================================= --> |
| 120 |
<!-- ====================================================================== --> |
| 121 |
<path id="Circle_Mcssz" fill="#FFFF00" stroke="#000000" d="M360 210 c 0 20 -16 36 -36 36 s -36 -16 -36 -36 s 16 -36 36 -36 s 36 16 36 36 z "/> |
| 122 |
<!-- ====================================================================== --> |
| 123 |
<!-- Markers for path control points ====================================== --> |
| 124 |
<!-- ====================================================================== --> |
| 125 |
<rect x="358" y="208" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 126 |
<rect x="322" y="244" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 127 |
<rect x="286" y="208" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 128 |
<rect x="322" y="172" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 129 |
<text font-size="12" x="290" y="265">M, c, s, s, s, z</text> |
| 130 |
<!-- ====================================================================== --> |
| 131 |
<!-- Inverted horseshoe using m, c & z ==================================== --> |
| 132 |
<!-- ====================================================================== --> |
| 133 |
<path id="Horseshoe_Mcs" fill="#F0F0F0" stroke="#00AA00" d="m 360 325 c -40 -60 95 -100 80 0 z "/> |
| 134 |
<!-- ====================================================================== --> |
| 135 |
<!-- Markers for path control points ====================================== --> |
| 136 |
<!-- ====================================================================== --> |
| 137 |
<rect x="358" y="323" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 138 |
<rect x="438" y="323" width="4" height="4" fill="#4A83FF" stroke="none"/> |
| 139 |
<text font-size="12" x="380" y="340">m, c, z</text> |
| 140 |
</g> |
| 141 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 142 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text> |
| 143 |
</g> |
| 144 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 145 |
<!-- comment out this watermark once the test is approved --> |
| 146 |
<!--<g id="draft-watermark"> |
| 147 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 148 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 149 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 150 |
</g>--> |
| 151 |
</svg> |