Debian Codegraph @

test_non_regression/svg/pservers-grad-02-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.8 $" testname="$RCSfile: pservers-grad-02-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 the viewer can handle the xlink:href attribute on
19 radial gradients.
20 </p>
21 <p>
22 There are two rectangles. The top one has
23 a radial gradient (black to orange) that should appear elliptical
24 to fit the aspect ratio of the rectangle. The units are
25 specified in objectBoundingBox space. The gradient
26 on the lower one
27 references the gradient of the top rectangle, but modifies
28 the units to use userSpace instead. So it is only using the
29 stops from the gradient to the left, with a different geometry. The radial gradient appears circular.
30 </p>
31 </d:testDescription>
32 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
33 <p>Run the test. No interaction required.</p>
34 </d:operatorScript>
35 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
36 <p>The test passes if the rendering matches the reference image, except
37 for any differences in text due to CSS2 rules. Specifically:</p>
38 <ul>
39 <li>The top rectangle is filled with an elliptical radial gradient,
40 with black in the center and orange at the outside edges of the rectangle.</li>
41 <li>The bottom rectangle is filled with a circular radial gradient,
42 with black in the center and orange at the top and bottom edges of the rectangle.
43 Outside the circular area, the rectangle is filled with plain orange.</li>
44 </ul>
45 </d:passCriteria>
46 </d:SVGTestCase>
47 <title id="test-title">$RCSfile: pservers-grad-02-b.svg,v $</title>
48 <defs>
49 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
50 <font-face-src>
51 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
52 </font-face-src>
53 </font-face>
54 </defs>
55 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
56 <!-- ====================================================================== -->
57 <!-- Radial Gradient using a xlink:href to another radial gradient -->
58 <!-- ====================================================================== -->
59 <radialGradient id="Grad2a" gradientUnits="objectBoundingBox" cx=".5" cy=".5" fx=".5" fy=".5" r=".5">
60 <stop stop-color="black" offset="0"/>
61 <stop stop-color="rgb(255,165,0)" offset="1"/>
62 </radialGradient>
63 <radialGradient id="Grad2b" xlink:href="#Grad2a" gradientUnits="userSpaceOnUse" cx="240" cy="190" fx="240" fy="190" r="40"/>
64 <rect x="20" y="20" width="440" height="80" fill="url(#Grad2a)"/>
65 <text font-size="30" x="20" y="130">Radial gradient.</text>
66 <rect x="20" y="150" width="440" height="80" fill="url(#Grad2b)"/>
67 <text font-size="30" x="20" y="260">Referencing gradient below.</text>
68 </g>
69 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
70 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
71 </g>
72 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
73 <!-- comment out this watermark once the test is approved -->
74 <!--<g id="draft-watermark">
75 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
76 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
77 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
78 </g>-->
79 </svg>