| 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="Vincent Hardy" status="accepted" |
| 15 |
version="$Revision: 1.6 $" testname="$RCSfile: coords-trans-03-t.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#EstablishingANewUserSpace"> |
| 17 |
<p> |
| 18 |
This test verifies the implementation of transforms. It tests elementary transforms |
| 19 |
and transform nesting. |
| 20 |
Note that for layout purposes, this test uses nesting of translation with the elementary transforms. |
| 21 |
</p> |
| 22 |
<p> |
| 23 |
The test uses the rect element, the fill color (solid primary colors) and transforms. |
| 24 |
</p> |
| 25 |
</d:testDescription> |
| 26 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 27 |
<p> |
| 28 |
Run the test. No interaction required. |
| 29 |
</p> |
| 30 |
</d:operatorScript> |
| 31 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 32 |
<p> |
| 33 |
The rendered picture should match the reference image exactly except for variations in the labeling text. |
| 34 |
</p> |
| 35 |
</d:passCriteria> |
| 36 |
</d:SVGTestCase> |
| 37 |
<title id="test-title">$RCSfile: coords-trans-03-t.svg,v $</title> |
| 38 |
<defs> |
| 39 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 40 |
<font-face-src> |
| 41 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 42 |
</font-face-src> |
| 43 |
</font-face> |
| 44 |
</defs> |
| 45 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 46 |
<g transform="translate(0, 30)" font-size="12"> |
| 47 |
<!-- ====================================================================== --> |
| 48 |
<!-- Now, test elementary transforms. For each transform, 3 markers are --> |
| 49 |
<!-- placed where the user space is expected after transformations for the --> |
| 50 |
<!-- origin (black) and the points in (20, 0) (blue) and (0, 20) (red). --> |
| 51 |
<!-- Then, a blue line going from (0, 0) to (20, 0) is drawn and a red line --> |
| 52 |
<!-- going from (0, 0) to (0, 20), after applying the elementary --> |
| 53 |
<!-- transformation. If the test succeeds, the red line should join the --> |
| 54 |
<!-- black marker to the red marker and the blue line the black marker to --> |
| 55 |
<!-- the blue marker. --> |
| 56 |
<!-- ====================================================================== --> |
| 57 |
<g id="elementary-transforms-test" transform="translate(0, 10)"> |
| 58 |
<g id="elementary-transforms" transform="translate(-560, 0) scale(2.5, 2.5)"> |
| 59 |
<!-- Skew X --> |
| 60 |
<g transform="translate(250, 50) skewX(45)"> |
| 61 |
<rect x="0" y="0" width="20" height="2" fill="blue"/> |
| 62 |
<rect x="0" y="0" width="2" height="20" fill="red"/> |
| 63 |
</g> |
| 64 |
<!-- Skew Y --> |
| 65 |
<g transform="translate(350, 50) skewY(45)"> |
| 66 |
<rect x="0" y="0" width="20" height="2" fill="blue"/> |
| 67 |
<rect x="0" y="0" width="2" height="20" fill="red"/> |
| 68 |
</g> |
| 69 |
</g> |
| 70 |
<!-- elementary-transforms --> |
| 71 |
<!-- Draw all the markers --> |
| 72 |
<g id="elementary-transforms-test-markers" transform="translate(-560, 0) scale(2.5, 2.5)"> |
| 73 |
<!-- Skew X --> |
| 74 |
<text x="240" y="40">skew x (45)</text> |
| 75 |
<rect x="248" y="48" width="5" height="5" fill="black"/> |
| 76 |
<rect x="268" y="48" width="5" height="5" fill="blue"/> |
| 77 |
<rect x="268" y="68" width="5" height="5" fill="red"/> |
| 78 |
<!-- Skew Y --> |
| 79 |
<text x="340" y="40">skew y (45)</text> |
| 80 |
<rect x="348" y="48" width="5" height="5" fill="black"/> |
| 81 |
<rect x="368" y="68" width="5" height="5" fill="blue"/> |
| 82 |
<rect x="348" y="68" width="5" height="5" fill="red"/> |
| 83 |
</g> |
| 84 |
<!-- elementary-transforms-test-markers --> |
| 85 |
</g> |
| 86 |
<!-- nested-transforms test --> |
| 87 |
</g> |
| 88 |
</g> |
| 89 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 90 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 91 |
</g> |
| 92 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 93 |
<!-- comment out this watermark once the test is approved --> |
| 94 |
<!--<g id="draft-watermark"> |
| 95 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 96 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 97 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 98 |
</g>--> |
| 99 |
</svg> |