| 1 |
<svg id="svg-root" width="100%" height="100%" |
| 2 |
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 7 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 8 |
<!--= All Rights Reserved. =--> |
| 9 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 10 |
<!--======================================================================--> |
| 11 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 12 |
template-version="1.4" reviewer="AG" author="ED" status="accepted" |
| 13 |
version="$Revision: 1.7 $" testname="$RCSfile: pservers-grad-20-b.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/animate.html#InterfaceSVGAnimationElement"> |
| 15 |
<p> |
| 16 |
This test has a gradient with gradientUnits='objectBoundingBox' which is a fade from black to white. |
| 17 |
The gradient is used for the stroke of a line. Vertical and horizontal lines don't have a boundingbox, since they are one-dimensional, even though the |
| 18 |
stroke-width makes it look like they should have a boundingbox with non-zero width and height. |
| 19 |
See the coordinate chapter, last paragraph of 7.11. |
| 20 |
</p> |
| 21 |
</d:testDescription> |
| 22 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 23 |
<p> |
| 24 |
The left rectangle has four 'line' elements rotated in different ways. The stroke for the lines have a green solid stroke fallback which |
| 25 |
should be used if the gradient should be ignored. |
| 26 |
|
| 27 |
The right rectangle is the same as the left rectangle except that the stroke paintservers don't have a fallback specified. |
| 28 |
</p> |
| 29 |
</d:operatorScript> |
| 30 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 31 |
<p> |
| 32 |
The test is passed if |
| 33 |
</p> |
| 34 |
<ul> |
| 35 |
<li> |
| 36 |
there are three lines with solid green stroke, and one line |
| 37 |
(from bottom left to top right) with a gradient stroke, visible in the left rectangle. |
| 38 |
</li> |
| 39 |
<li>there is a line from bottom left to top right with a gradient stroke, visible in the right rectangle.</li> |
| 40 |
</ul> |
| 41 |
</d:passCriteria> |
| 42 |
</d:SVGTestCase> |
| 43 |
<title id="test-title">$RCSfile: pservers-grad-20-b.svg,v $</title> |
| 44 |
<defs> |
| 45 |
<font-face |
| 46 |
font-family="SVGFreeSansASCII" |
| 47 |
unicode-range="U+0-7F"> |
| 48 |
<font-face-src> |
| 49 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 50 |
</font-face-src> |
| 51 |
</font-face> |
| 52 |
</defs> |
| 53 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 54 |
<defs> |
| 55 |
<linearGradient id="grad"> |
| 56 |
<stop offset="0" stop-color="black" /> |
| 57 |
<stop offset="1" stop-color="white" /> |
| 58 |
</linearGradient> |
| 59 |
</defs> |
| 60 |
|
| 61 |
<!-- sub-test 1: stroke with solid color fallback --> |
| 62 |
<g transform="translate(50, 100) scale(0.3)"> |
| 63 |
<path d="M0 180L480 180" stroke="url(#grad) #0f0" stroke-width="20"/> |
| 64 |
<path d="M0 180L480 180" stroke="url(#grad) #0f0" stroke-width="20" transform="rotate(45 240 180)"/> |
| 65 |
<path d="M0 180L480 180" stroke="url(#grad) #0f0" stroke-width="20" transform="rotate(90 240 180)"/> |
| 66 |
<path d="M410 10L70 350" stroke="url(#grad) #0f0" stroke-width="20"/> |
| 67 |
<rect x="0" y="-60" width="480" height="480" fill="none" stroke="black"/> |
| 68 |
</g> |
| 69 |
<text x="120" y="250" text-anchor="middle">With fallback</text> |
| 70 |
|
| 71 |
<!-- sub-test 2: stroke without a fallback --> |
| 72 |
<g transform="translate(280,100) scale(0.3)"> |
| 73 |
<path d="M0 180L480 180" stroke="url(#grad)" stroke-width="20"/> |
| 74 |
<path d="M0 180L480 180" stroke="url(#grad)" stroke-width="20" transform="rotate(45 240 180)"/> |
| 75 |
<path d="M0 180L480 180" stroke="url(#grad)" stroke-width="20" transform="rotate(90 240 180)"/> |
| 76 |
<path d="M410 10L70 350" stroke="url(#grad)" stroke-width="20"/> |
| 77 |
<rect x="0" y="-60" width="480" height="480" fill="none" stroke="black"/> |
| 78 |
</g> |
| 79 |
<text x="350" y="250" text-anchor="middle">Without fallback</text> |
| 80 |
</g> |
| 81 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 82 |
<text id="revision" x="10" y="340" stroke="none" |
| 83 |
fill="black">$Revision: 1.7 $</text> |
| 84 |
</g> |
| 85 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 86 |
<!-- comment out this watermark once the test is approved --> |
| 87 |
<!--<g id="draft-watermark"> |
| 88 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 89 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 90 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 91 |
</g>--> |
| 92 |
</svg> |