1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
4 <!--======================================================================-->
5 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, Institut National de Recherche en =-->
7 <!--= Informatique et en Automatique, Keio University). All Rights =-->
8 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
9 <!--======================================================================-->
10 <!-- =====================================================================-->
12 <!-- gradPatt-transform-BE-09.svg -->
13 <!-- renamed for 1.1 suite to pservers-grad-06-b.svg -->
15 <!-- Test that the viewer can handle the gradientTransform and -->
16 <!-- the patternTransform attribute on gradients and patterns -->
17 <!-- respectively. -->
19 <!-- Author : Haroon Sheikh 08-Mar-2000 -->
20 <!-- Revised for 1.1 : Jun Fujisawa 19-Feb-2002 -->
23 <!-- 09-Mar-2000, HSS: Serial#1 created. -->
24 <!-- 02-Jun-2000, DJ: Fixed gradientTransform to patternTransform. -->
25 <!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
26 <!-- 16-Aug-2000, LH="rename" ser#3. -->
28 <!-- =====================================================================-->
29 <!--======================================================================-->
30 <!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
31 <!--= log messages, and therefore is no longer in the preceding preamble.=-->
32 <!--======================================================================-->
33 <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">
34 <SVGTestCase xmlns=
"http://www.w3.org/2000/02/svg/testsuite/description/">
35 <OperatorScript version=
"$Revision: 1.7 $" testname=
"pservers-grad-06-b.svg">
37 Test that the viewer can handle the gradientTransform and the patternTransform
38 attribute on gradients and patterns respectively.
41 From top-down the appearance of objects is as follows.
44 The top rectangle has a linear gradient whose coordinate system has been scaled down by
45 a half. So the gradient travelling from left to righ (from blue to red to lime) should
46 only occuply the left half the rectangle.
49 The next rectangle has radial gradient that has been translated to the center and skewed
50 in the positive X direction by
45 degrees. Therefore the gradient should appear
51 ellipltical and rotated around the center.
54 The last row contains a rectangle with pattern on the fill. The transformation on the
55 pattern moves the coordinate system to the top left of the rectangle and then scales it
56 by a factor of
2 and then skew's it in the X direction by
45 degrees. The pattern
57 consists of a
2 by
2 array of colored rectangles.
60 The rendered picture should match the reference image exactly, except for possible
61 variations in the labelling text (per CSS2 rules).
65 <title id=
"test-title">pservers-grad-
06-b
</title>
66 <desc id=
"test-desc">Test that the viewer can handle the gradientTransform and the patternTransform attribute on gradients and patterns respectively.
</desc>
67 <!--======================================================================-->
68 <!--Content of Test Case follows... =====================-->
69 <!--======================================================================-->
70 <g id=
"test-body-content">
71 <!-- ====================================================================== -->
72 <!-- Linear Gradient with gradientTransforms -->
73 <!-- ====================================================================== -->
74 <linearGradient id=
"Grad1" gradientUnits=
"userSpaceOnUse" x1=
"0" y1=
"0" x2=
"430" y2=
"0" gradientTransform=
"translate(25 35) scale(0.5)">
75 <stop stop-color=
"blue" offset=
"0"/>
76 <stop stop-color=
"red" offset=
"0.5"/>
77 <stop stop-color=
"lime" offset=
"1"/>
79 <rect x=
"20" y=
"20" width=
"440" height=
"50" fill=
"url(#Grad1)"/>
80 <text font-family=
"Arial" font-size=
"30" x=
"20" y=
"100">scale(
0.5) on gradient
</text>
81 <!-- ====================================================================== -->
82 <!-- Radial Gradiant with a gradientTransform -->
83 <!-- ====================================================================== -->
84 <radialGradient id=
"Grad2" gradientUnits=
"userSpaceOnUse" cx=
"0" cy=
"0" fx=
"0" fy=
"0" r=
"60" gradientTransform=
"translate(240,155) skewX(45)">
85 <stop stop-color=
"black" offset=
"0"/>
86 <stop stop-color=
"rgb(255,165,0)" offset=
"1"/>
88 <rect x=
"20" y=
"110" width=
"440" height=
"50" fill=
"url(#Grad2)"/>
89 <text font-family=
"Arial" font-size=
"30" x=
"20" y=
"190">skewX(
45) on gradient
</text>
90 <!-- ====================================================================== -->
91 <!-- Pattern filled rectangles with a patternTransform. -->
92 <!-- ====================================================================== -->
93 <pattern patternUnits=
"userSpaceOnUse" id=
"Pat3" x=
"0" y=
"0" width=
"20" height=
"20" patternTransform=
"translate(25 215) scale(2) skewX(45)">
94 <rect x=
"0" y=
"0" width=
"10" height=
"10" fill=
"red"/>
95 <rect x=
"10" y=
"0" width=
"10" height=
"10" fill=
"green"/>
96 <rect x=
"0" y=
"10" width=
"10" height=
"10" fill=
"blue"/>
97 <rect x=
"10" y=
"10" width=
"10" height=
"10" fill=
"yellow"/>
99 <rect x=
"20" y=
"210" width=
"440" height=
"50" fill=
"url(#Pat3)"/>
100 <text font-family=
"Arial" font-size=
"30" x=
"20" y=
"290">scale(
2), skewX(
45) on pattern
</text>
102 <text id=
"revision" x=
"10" y=
"340" font-size=
"40" stroke=
"none" fill=
"black">$Revision:
1.7 $
</text>
103 <rect id=
"test-frame" x=
"1" y=
"1" width=
"478" height=
"358" fill=
"none" stroke=
"#000000"/>