Debian Codegraph @

test_non_regression/svg/pservers-grad-stops-01-f.svg

raw
1 <svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2 <!--======================================================================-->
3 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
4 <!--= Institute of Technology, European Research Consortium for =-->
5 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
6 <!--= All Rights Reserved. =-->
7 <!--= See http://www.w3.org/Consortium/Legal/. =-->
8 <!--======================================================================-->
9 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" template-version="1.4" reviewer="CM" author="Microsoft" status="reviewed" version="$Revision: 1.3 $" testname="$RCSfile: pservers-grad-stops-01-f.svg,v $">
10 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG/pservers.html#GradientStops">
11 <p>
12 Test that gradient offset values less than zero are rounded up to zero and values more than one are rounded down to one.
13 </p>
14 <p>
15 The test defines four gradients, each with a single stop where the 'stop-color' is set to 'blue'.
16 The four gradients have 'offset' set to '-1', '-1%', '101%' and '2'. Four rectangles reference
17 the gradients. All of these should render as if they have plain blue fills.
18 </p>
19 </d:testDescription>
20 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
21 <p>Run the test. No interaction required.</p>
22 </d:operatorScript>
23 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
24 <p>
25 The test passed if there are four blue boxes on the page.
26 </p>
27 </d:passCriteria>
28 </d:SVGTestCase>
29 <title id="test-title">$RCSfile: pservers-grad-stops-01-f.svg,v $</title>
30 <defs>
31 <font-face
32 font-family="SVGFreeSansASCII"
33 unicode-range="U+0-7F">
34 <font-face-src>
35 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
36 </font-face-src>
37 </font-face>
38 </defs>
39 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
40 <defs>
41 <linearGradient id="gradient1">
42 <stop offset="-1" stop-color="blue" />
43 </linearGradient>
44 <linearGradient id="gradient2">
45 <stop offset="-1%" stop-color="blue" />
46 </linearGradient>
47 <linearGradient id="gradient3">
48 <stop offset="2" stop-color="blue" />
49 </linearGradient>
50 <linearGradient id="gradient4">
51 <stop offset="101%" stop-color="blue" />
52 </linearGradient>
53 </defs>
54 <rect fill="url(#gradient1)" stroke="black" stroke-width="5" x="10" y="10" width="100" height="100" />
55 <rect fill="url(#gradient2)" stroke="black" stroke-width="5" x="120" y="10" width="100" height="100" />
56 <rect fill="url(#gradient3)" stroke="black" stroke-width="5" x="10" y="120" width="100" height="100" />
57 <rect fill="url(#gradient4)" stroke="black" stroke-width="5" x="120" y="120" width="100" height="100" />
58 </g>
59 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
60 <text id="revision" x="10" y="340" stroke="none"
61 fill="black">$Revision: 1.3 $</text>
62 </g>
63 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
64 <!-- comment out this watermark once the test is approved -->
65 <g id="draft-watermark">
66 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
67 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
68 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
69 </g>
70 </svg>