Debian Codegraph @

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

raw
1 <svg version="1.1" baseProfile="basic" 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="Haroon Sheikh" status="accepted"
15 version="$Revision: 1.9 $" testname="$RCSfile: pservers-grad-05-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 Test that checks the capability of the stop opacity in linear and radial
19 gradients.
20 </p>
21 <p>
22 There are two tests which contain rectangles with gradients using stop-opacity properties.
23 A cyan color text string "Background" is put behind both of the rectangles to help
24 demonstrate the opacity concept.
25 </p>
26 <p>
27 From top-down the appearance of objects is as follows.
28 </p>
29 <p>
30 The first rectangle has a linear gradient fill with a vector starting at top left
31 and going to bottom right. The stop colors are at 20% spacing apart and are in the
32 following order : violet, blue, lime, yellow, orange, black.
33 Also a stop opacity is given to the colors in the following order: 1, 0.2, 0.5, 0, 0.8, 1
34 Because the gradient vector vector goes from (0,0) to (1,1) in object bounding box space
35 and because the object bounding box has a larger width than height, the gradient vector
36 is skewed off of a pure 45 degree angle. The gradient stripes are also skewed
37 so that they are no longer perpendicular to the gradient vector.
38 </p>
39 <p>
40 The next rectangle has a radial gradient fill with a multi-color stops from innermost
41 to outermost in the following order: black, yellow, red, blue, white, green.
42 Also a stop opacity is given to the colors in the following order: 1, 0.2, 0.5, 0, 0.8, 1
43 </p>
44 </d:testDescription>
45 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
46 <p>Run the test. No interaction required.</p>
47 </d:operatorScript>
48 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
49 <p>The test passes if the rendering matches the reference image, except for
50 any differences in text due to CSS2 rules.</p>
51 </d:passCriteria>
52 </d:SVGTestCase>
53 <title id="test-title">$RCSfile: pservers-grad-05-b.svg,v $</title>
54 <defs>
55 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
56 <font-face-src>
57 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
58 </font-face-src>
59 </font-face>
60 </defs>
61 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
62 <text font-size="60" fill="aqua" x="70" y="80">Background</text>
63 <linearGradient id="Grad1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="1">
64 <stop stop-color="rgb(238,130,238)" stop-opacity="1" offset="0"/>
65 <stop stop-color="blue" stop-opacity="0" offset="0.2"/>
66 <stop stop-color="lime" stop-opacity="0.5" offset="0.4"/>
67 <stop stop-color="yellow" stop-opacity="0.2" offset="0.6"/>
68 <stop stop-color="rgb(255,165,0)" stop-opacity="0.8" offset="0.8"/>
69 <stop stop-color="black" stop-opacity="1" offset="1"/>
70 </linearGradient>
71 <rect x="20" y="20" width="440" height="80" fill="url(#Grad1)"/>
72
73 <text font-size="60" fill="aqua" x="70" y="210">Background</text>
74 <radialGradient id="Grad2" gradientUnits="userSpaceOnUse" cx="240" cy="210" r="220" fx="240" fy="210">
75 <stop stop-color="black" stop-opacity="1" offset="0"/>
76 <stop stop-color="yellow" stop-opacity="0" offset="0.2"/>
77 <stop stop-color="red" stop-opacity="0.5" offset="0.4"/>
78 <stop stop-color="blue" stop-opacity="0.2" offset="0.6"/>
79 <stop stop-color="white" stop-opacity="0.8" offset="0.8"/>
80 <stop stop-color="green" stop-opacity="1" offset="1"/>
81 </radialGradient>
82 <rect x="20" y="150" width="440" height="80" fill="url(#Grad2)" stroke-width="40"/>
83 </g>
84 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
85 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
86 </g>
87 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
88 <!-- comment out this watermark once the test is approved -->
89 <!--<g id="draft-watermark">
90 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
91 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
92 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
93 </g>-->
94 </svg>