| 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="Tim Thompson" status="accepted" |
| 15 |
version="$Revision: 1.5 $" testname="$RCSfile: struct-group-01-t.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/struct.html#Groups"> |
| 17 |
<p> |
| 18 |
The test checks to see that graphics elements (g) can be nested and that the like attributes can be passed to the children. |
| 19 |
All the g elements for this test are in the g element whose id=allGs. |
| 20 |
</p> |
| 21 |
</d:testDescription> |
| 22 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 23 |
<p> |
| 24 |
The test uses the 'rect' element, as well as basic fill (solid primary colors), |
| 25 |
stroke (black 1-pixel lines), font-family and font-size properties. |
| 26 |
</p> |
| 27 |
<p> |
| 28 |
The two blue rectangles and the yellow are in the g labeled rects. |
| 29 |
The blue rectangles inherit a fill color the green rect has a fill specified and it should not be overwritten. |
| 30 |
The two yellow rectangles should inherit the fill color and the transform attribute, they should be |
| 31 |
yellow and rotated at -20 degrees. These two rectangles are in g "yellowNrotate", that g is nested |
| 32 |
inside g "gratuitiousG". The black rectangle in the upper right, has no attributes inherited from its parent. |
| 33 |
The focus is nesting of g elements and passing on of attributes. |
| 34 |
</p> |
| 35 |
</d:operatorScript> |
| 36 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 37 |
<p> |
| 38 |
The rendered picture should match the reference image, except for possible |
| 39 |
variations in the labelling text (per CSS2 rules). |
| 40 |
</p> |
| 41 |
</d:passCriteria> |
| 42 |
</d:SVGTestCase> |
| 43 |
<title id="test-title">$RCSfile: struct-group-01-t.svg,v $</title> |
| 44 |
<defs> |
| 45 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 46 |
<font-face-src> |
| 47 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 48 |
</font-face-src> |
| 49 |
</font-face> |
| 50 |
</defs> |
| 51 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 52 |
<g id="rects" fill="blue"> |
| 53 |
<rect x="0" y="0" width="240" height="180"/> |
| 54 |
<rect x="60" y="45" width="120" height="90" fill="green"/> |
| 55 |
<rect x="240" y="180" width="240" height="180"/> |
| 56 |
</g> |
| 57 |
<g id="singleG"> |
| 58 |
<rect x="240" y="0" width="240" height="180" fill="black"/> |
| 59 |
</g> |
| 60 |
<g id="gratuitiousG"> |
| 61 |
<g id="yellowNrotate" fill="yellow" transform="rotate(-20)"> |
| 62 |
<rect x="0" y="224" width="40" height="40"/> |
| 63 |
<rect x="0" y="280" width="40" height="40"/> |
| 64 |
</g> |
| 65 |
</g> |
| 66 |
</g> |
| 67 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 68 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text> |
| 69 |
</g> |
| 70 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 71 |
<!-- comment out this watermark once the test is approved --> |
| 72 |
<!--<g id="draft-watermark"> |
| 73 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 74 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 75 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 76 |
</g>--> |
| 77 |
</svg> |