Debian Codegraph @

samples/gradients.svg

raw
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
5 <!--
6
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21
22 -->
23 <!-- ========================================================================= -->
24 <!-- Test description here -->
25 <!-- -->
26 <!-- @author [email protected] -->
27 <!-- @version $Id$ -->
28 <!-- ========================================================================= -->
29
30 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="450" height="500" viewBox="0 0 450 500">
31 <!-- ============================================================= -->
32 <!-- Test content -->
33 <!-- ============================================================= -->
34 <svg id="testContent" x="25" y="20" width="400" height="400" viewBox="0 0 400 400">
35 <defs>
36 <!-- Nose Paint -->
37 <radialGradient id="nosePaint" gradientUnits="userSpaceOnUse"
38 cx="150" cy="160" fx="130" fy="140" r="60">
39 <stop offset="0%" style="stop-color:white" />
40 <stop offset="20%" style="stop-color:#ccccff" />
41 <stop offset="100%" style="stop-color:#222255" />
42 </radialGradient>
43
44 <!-- Gradients -->
45 <radialGradient id="eyeBallPaint" gradientUnits="objectBoundingBox"
46 fx=".2" fy=".2" r=".5">
47 <stop offset="0%" style="stop-color:white" />
48 <stop offset="20%" style="stop-color:#ccccff" />
49 <stop offset="100%" style="stop-color:#222255" />
50 </radialGradient>
51
52 <!-- Pattern Gradient -->
53 <radialGradient id="patternBall" gradientUnits="objectBoundingBox"
54 fx="30%" fy="30%" >
55 <stop offset="0%" style="stop-color:white" />
56 <stop offset="20%" style="stop-color:#666688" />
57 <stop offset="100%" style="stop-color:black" />
58 </radialGradient>
59
60 <!-- Pattern Gradient -->
61 <radialGradient id="yellowPatternBall" gradientUnits="objectBoundingBox"
62 fx="30%" fy="30%" >
63 <stop offset="0%" style="stop-color:white" />
64 <stop offset="20%" style="stop-color:yellow" />
65 <stop offset="40%" style="stop-color:orange" />
66 <stop offset="100%" style="stop-color:#442200" />
67 </radialGradient>
68
69 <linearGradient id="backgroundGradient" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="400" y2="300">
70 <stop offset="0%" style="stop-color:white" />
71 <stop offset="50%" style="stop-color:#666688" />
72 <stop offset="100%" style="stop-color:black" />
73 </linearGradient>
74
75 <circle id="ball" cx="0" cy="0" r="30" style="fill:url(#patternBall)" />
76 <circle id="yellowBall" cx="0" cy="0" r="30" style="fill:url(#yellowPatternBall)" />
77
78 <g id="ballRow">
79 <use xlink:href="#ball" x="30" y="30" />
80 <use xlink:href="#ball" x="90" y="30" />
81 <use xlink:href="#ball" x="150" y="30" />
82 <use xlink:href="#ball" x="210" y="30" />
83 <use xlink:href="#ball" x="270" y="30" />
84 <use xlink:href="#ball" x="330" y="30" />
85 <use xlink:href="#ball" x="390" y="30" />
86 <use xlink:href="#ball" x="450" y="30" />
87 </g>
88
89 </defs>
90
91 <!-- Background sky -->
92 <rect x="0" y="0" width="100%" height="300" style="fill:url(#backgroundGradient)" />
93 <!-- Background Texture -->
94 <use xlink:href="#ballRow" x="0" y="270"/>
95 <use xlink:href="#ballRow" x="-30" y="300"/>
96 <use xlink:href="#yellowBall" x="120" y="330" />
97 <use xlink:href="#ballRow" x="0" y="330"/>
98 <use xlink:href="#ballRow" x="-30" y="360"/>
99 <use xlink:href="#ballRow" x="0" y="390"/>
100
101
102 <!-- Group which contains all the happy face elements -->
103 <g id="surprisedFace" style="fill:white;" transform="translate(50, -30)">
104 <!-- Left eye -->
105 <circle cx="90" cy="100" r="30" style="fill:url(#eyeBallPaint)"/>
106 <circle cx="102" cy="112" r="15" style="fill:black; stroke:none;" />
107
108 <!-- Right eye -->
109 <circle cx="90" cy="100" r="30" transform="translate(120, 0)" style="fill:url(#eyeBallPaint)"/>
110 <circle cx="198" cy="112" r="15" style="fill:black; stroke:none;" />
111
112 <!-- Nose -->
113 <circle cx="150" cy="160" r="60" style="fill:url(#nosePaint)"/>
114
115 <!-- Smile -->
116 <circle cx="150" cy="260" r="20" style="fill:url(#eyeBallPaint)"/>
117
118 </g>
119 </svg>
120
121 <!-- ============================================================= -->
122 <!-- Batik sample mark -->
123 <!-- ============================================================= -->
124 <use xlink:href="batikLogo.svg#Batik_Tag_Box" />
125 </svg>