Debian Codegraph @

test_non_regression/svg/pservers-grad-18-b.svg

raw
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="ED" author="CC" status="accepted"
15 version="$Revision: 1.5 $" testname="$RCSfile: pservers-grad-18-b.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
17 <p>
18 This test shows rectangles filled with gradient.
19 Several gradients are defined, with two stops:
20 </p>
21 </d:testDescription>
22 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
23 <p>
24 For the top-left rectangle's gradient:
25 The first stop defines a fully-opaque green color.
26 The second stop explicitly inherits (i.e. using the 'inherit' keyword) its stop-color.
27 </p>
28 <p>
29 For the top-right rectangle's gradient:
30 The first stop defines a fully-opaque green color.
31 The second stop defines a green stop-color but explicitly inherits (i.e. using the 'inherit' keyword) the stop-opacity.
32 </p>
33 <p>
34 For the bottom-left rectangle's gradient:
35 The first stop defines a fully-opaque green color.
36 The second stop does not specify the stop-color and the stop-opacity.
37 Since both properties are not inherited, the initial value should be used.
38 </p>
39 <p>
40 For the bottom-right rectangle's gradient:
41 The first stop defines a fully-opaque green color.
42 The second stop specifies the stop-color using the 'currentColor' keyword.
43 </p>
44 </d:operatorScript>
45 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
46 <p>
47 The result should be:
48 </p>
49 <p>
50 The top-left rectangle is filled with a gradient from green to pink since
51 the stop-color is inherited from the location of the gradient definition.
52 </p>
53 <p>
54 The top-right rectangle filled in green with a gradient opacity.
55 </p>
56 <p>
57 The lower-left rectangle filled with a gradient going from fully-opaque green to fully-opaque black.
58 </p>
59 <p>
60 The lower-right rectangle filled with a gradient going from fully-opaque green to fully-opaque yellow.
61 </p>
62 </d:passCriteria>
63 </d:SVGTestCase>
64 <title id="test-title">$RCSfile: pservers-grad-18-b.svg,v $</title>
65 <defs>
66 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
67 <font-face-src>
68 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
69 </font-face-src>
70 </font-face>
71 </defs>
72 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
73 <g id="g0" stop-color="#f48" stop-opacity="0.5" color="yellow">
74 <linearGradient id="MyGradient1" stop-color="inherit">
75 <stop offset="0" stop-color="green" stop-opacity="1"/>
76 <stop offset="1" stop-color="inherit" stop-opacity="1"/>
77 </linearGradient>
78 <linearGradient id="MyGradient2" stop-opacity="inherit">
79 <stop offset="0" stop-color="green" stop-opacity="1"/>
80 <stop offset="1" stop-color="green" stop-opacity="inherit"/>
81 </linearGradient>
82 <linearGradient id="MyGradient3">
83 <stop offset="0" stop-color="green" stop-opacity="1"/>
84 <stop offset="1"/>
85 </linearGradient>
86 <linearGradient id="MyGradient4">
87 <stop offset="0" stop-color="green" stop-opacity="1"/>
88 <stop offset="1" stop-color="currentColor" stop-opacity="1"/>
89 </linearGradient>
90 </g>
91 <g id="g1" stop-color="blue">
92 <rect id="r1" fill="url(#MyGradient1)" width="100" height="100" x="50" y="50"/>
93 </g>
94 <g id="g2" stop-opacity="1">
95 <rect id="r2" fill="url(#MyGradient2)" width="100" height="100" x="200" y="50"/>
96 </g>
97 <g id="g3" stop-opacity="1" stop-color="blue">
98 <rect id="r3" fill="url(#MyGradient3)" width="100" height="100" x="50" y="200"/>
99 </g>
100 <g id="g4" color="blue">
101 <rect id="r4" fill="url(#MyGradient4)" width="100" height="100" x="200" y="200"/>
102 </g>
103 </g>
104 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
105 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
106 </g>
107 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
108 <!-- comment out this watermark once the test is approved -->
109 <!--<g id="draft-watermark">
110 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
111 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
112 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
113 </g>-->
114 </svg>