| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> |
| |
| <!--======================================================================--> |
| <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =--> |
| <!--= Institute of Technology, Institut National de Recherche en =--> |
| <!--= Informatique et en Automatique, Keio University). All Rights =--> |
| <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =--> |
| <!--======================================================================--> |
| <!-- ===================================================================== --> |
| <!-- --> |
| <!-- gradPatt-radialGradient-BE-05.svg --> |
| <!-- renamed for 1.1 suite to pservers-grad-12-b.svg --> |
| <!-- --> |
| <!-- Test that the viewer can handle the gradientUnits attribute on --> |
| <!-- radial gradients. --> |
| <!-- --> |
| <!-- Author : Haroon Sheikh 07-Mar-2000 --> |
| <!-- 1.1 revision by Rick Graham --> |
| <!-- --> |
| <!-- History: --> |
| <!-- 26-May-2000, JF: Serial#3 PNG created (SVG unchanged). --> |
| <!-- objectBoundingBox radial gradient now elliptical. --> |
| <!-- (Serial#2 apparently wasn't ever documented) --> |
| <!-- 07-Mar-2000, HSS: Serial#1 created. --> |
| <!-- 26-Apr-2000, DJ: Removed "should". be to BE --> |
| <!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . --> |
| <!-- 16-Aug-2000, LH="rename" ser#4. --> |
| <!-- --> |
| <!-- ===================================================================== --> |
| <!--======================================================================--> |
| <!--= Note. After October 2000, revision history is kept as CVS 'commit' =--> |
| <!--= log messages, and therefore is no longer in the preceding preamble.=--> |
| <!--======================================================================--> |
| <svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> |
| <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"> |
| <OperatorScript version="$Revision: 1.7 $" testname="pservers-grad-12-b.svg"> |
| <Paragraph> |
| Test that the viewer can handle the gradientUnits attribute on radial gradients. |
| It tests the following values of gradientUnits : default (objectBoundingBox), objectBoundingBox, |
| and userSpaceOnUse. |
| </Paragraph> |
| <Paragraph> |
| From top-down the appearance of objects is as follows. |
| </Paragraph> |
| <Paragraph> |
| The first rectangle uses the default attributes on the radialGradient element. |
| Therefore the radial gradient should be relative to the object bounding box. It should appear |
| from the center of the viewport (blue) to the edges of the viewport (red). |
| The rectangle is wider than tall so it the gradient should be elliptical, not circular. |
| </Paragraph> |
| <Paragraph> |
| The next rectangle uses gradientUnits=objectBoundingBox. The radial gradient should |
| travel from a center of 20%, 20% of the rectangle with a radius of 50%. |
| </Paragraph> |
| <Paragraph> |
| The last rectangle uses gradientUnits=userSpaceOnUse. The rectangle element is given it's |
| own transformation and the gradient is assumed to be in this user space. |
| The gradient should appear in the center of the rectangle as a radial gradient from red (center) to blue (edge). |
| </Paragraph> |
| <Paragraph> |
| The rendered picture should match the reference image exactly, except for possible |
| variations in the labelling text (per CSS2 rules). |
| </Paragraph> |
| </OperatorScript> |
| </SVGTestCase> |
| <title id="test-title">pservers-grad-12-b.svg</title> |
| <desc id="test-desc">Test that the viewer can handle the gradientUnits attribute on radial gradients.</desc> |
| <!--======================================================================--> |
| <!--Content of Test Case follows... =====================--> |
| <!--======================================================================--> |
| <g id="test-body-content"> |
| <text font-family="Arial" font-size="15" x="10" y="25">Testing gradientUnits attribute</text> |
| <!-- ====================================================================== --> |
| <!-- Radial gradient with default attributes on <radial gradient> element. --> |
| <!-- ====================================================================== --> |
| <radialGradient id="Grad1"> |
| <stop stop-color="blue" offset="0"/> |
| <stop stop-color="red" offset="1"/> |
| </radialGradient> |
| <rect x="10" y="35" width="460" height="50" fill="url(#Grad1)" /> |
| <text font-family="Arial" font-size="12" x="10" y="100">Radial gradient with default attributes (from blue to red)</text> |
| <text font-family="Arial" font-size="12" x="10" y="115">Gradient is blue at the object center and red at the object edges</text> |
| <!-- ====================================================================== --> |
| <!-- Radial gradient with gradientUnits=objectBoundingBox ======== --> |
| <!-- ====================================================================== --> |
| <radialGradient id="Grad2" gradientUnits="objectBoundingBox" cx=".2" cy=".2" fx=".2" fy=".2" r=".5"> |
| <stop stop-color="blue" offset="0"/> |
| <stop stop-color="red" offset="1"/> |
| </radialGradient> |
| <rect x="10" y="125" width="460" height="50" fill="url(#Grad2)" /> |
| <text font-family="Arial" font-size="12" x="10" y="190">gradientUnits=objectBoundingBox</text> |
| <text font-family="Arial" font-size="12" x="10" y="205">cx=.2, cy=.2, r=.5, fx=.2 fy=.2</text> |
| <!-- ====================================================================== --> |
| <!-- Gradient using gradientUnits="userSpaceOnUse" --> |
| <!-- ====================================================================== --> |
| <radialGradient id="Grad3" cx="25" cy="215" r="25" fx="25" fy="215" gradientUnits="userSpaceOnUse"> |
| <stop stop-color="red" offset="0"/> |
| <stop stop-color="blue" offset="1"/> |
| </radialGradient> |
| <rect transform="translate(10, 260) rotate(-90)" x="0" y="0" width="50" height="460" fill="url(#Grad3)" /> |
| <text font-family="Arial" font-size="12" x="10" y="275">gradientUnits=userSpaceOnUse</text> |
| <text font-family="Arial" font-size="12" x="10" y="290">Gradient is red to blue radial gradiant from center to horizontal bounds</text> |
| </g> |
| |
| |
| <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.7 $</text> |
| <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| </svg> |
| |