blob: 8db1b301cdd9f991a92f2caed9bd2b9722808493 [file] [log] [blame]
<?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-transform-BE-09.svg -->
<!-- renamed for 1.1 suite to pservers-grad-06-b.svg -->
<!-- -->
<!-- Test that the viewer can handle the gradientTransform and -->
<!-- the patternTransform attribute on gradients and patterns -->
<!-- respectively. -->
<!-- -->
<!-- Author : Haroon Sheikh 08-Mar-2000 -->
<!-- Revised for 1.1 : Jun Fujisawa 19-Feb-2002 -->
<!-- -->
<!-- History: -->
<!-- 09-Mar-2000, HSS: Serial#1 created. -->
<!-- 02-Jun-2000, DJ: Fixed gradientTransform to patternTransform. -->
<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
<!-- 16-Aug-2000, LH="rename" ser#3. -->
<!-- -->
<!-- =====================================================================-->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" viewBox="0 0 480 360" width="100%" height="100%" version="1.1" baseProfile="basic">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript version="$Revision: 1.7 $" testname="pservers-grad-06-b.svg">
<Paragraph>
Test that the viewer can handle the gradientTransform and the patternTransform
attribute on gradients and patterns respectively.
</Paragraph>
<Paragraph>
From top-down the appearance of objects is as follows.
</Paragraph>
<Paragraph>
The top rectangle has a linear gradient whose coordinate system has been scaled down by
a half. So the gradient travelling from left to righ (from blue to red to lime) should
only occuply the left half the rectangle.
</Paragraph>
<Paragraph>
The next rectangle has radial gradient that has been translated to the center and skewed
in the positive X direction by 45 degrees. Therefore the gradient should appear
ellipltical and rotated around the center.
</Paragraph>
<Paragraph>
The last row contains a rectangle with pattern on the fill. The transformation on the
pattern moves the coordinate system to the top left of the rectangle and then scales it
by a factor of 2 and then skew's it in the X direction by 45 degrees. The pattern
consists of a 2 by 2 array of colored rectangles.
</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-06-b</title>
<desc id="test-desc">Test that the viewer can handle the gradientTransform and the patternTransform attribute on gradients and patterns respectively.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<!-- ====================================================================== -->
<!-- Linear Gradient with gradientTransforms -->
<!-- ====================================================================== -->
<linearGradient id="Grad1" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="430" y2="0" gradientTransform="translate(25 35) scale(0.5)">
<stop stop-color="blue" offset="0"/>
<stop stop-color="red" offset="0.5"/>
<stop stop-color="lime" offset="1"/>
</linearGradient>
<rect x="20" y="20" width="440" height="50" fill="url(#Grad1)"/>
<text font-family="Arial" font-size="30" x="20" y="100">scale(0.5) on gradient</text>
<!-- ====================================================================== -->
<!-- Radial Gradiant with a gradientTransform -->
<!-- ====================================================================== -->
<radialGradient id="Grad2" gradientUnits="userSpaceOnUse" cx="0" cy="0" fx="0" fy="0" r="60" gradientTransform="translate(240,155) skewX(45)">
<stop stop-color="black" offset="0"/>
<stop stop-color="rgb(255,165,0)" offset="1"/>
</radialGradient>
<rect x="20" y="110" width="440" height="50" fill="url(#Grad2)"/>
<text font-family="Arial" font-size="30" x="20" y="190">skewX(45) on gradient</text>
<!-- ====================================================================== -->
<!-- Pattern filled rectangles with a patternTransform. -->
<!-- ====================================================================== -->
<pattern patternUnits="userSpaceOnUse" id="Pat3" x="0" y="0" width="20" height="20" patternTransform="translate(25 215) scale(2) skewX(45)">
<rect x="0" y="0" width="10" height="10" fill="red"/>
<rect x="10" y="0" width="10" height="10" fill="green"/>
<rect x="0" y="10" width="10" height="10" fill="blue"/>
<rect x="10" y="10" width="10" height="10" fill="yellow"/>
</pattern>
<rect x="20" y="210" width="440" height="50" fill="url(#Pat3)"/>
<text font-family="Arial" font-size="30" x="20" y="290">scale(2), skewX(45) on pattern</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>