Debian Codegraph @

samples/tests/spec/text/textProperties.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 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
30
31 <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">
32 <title>Text Properties</title>
33
34 <!-- ============================================================= -->
35 <!-- Test content -->
36 <!-- ============================================================= -->
37
38 <defs>
39
40 <style type="text/css"><![CDATA[
41 .Caption { font-size: 8; font-family: dialog; font-weight: normal;
42 font-style: normal; stroke: none; stroke-width: 0;
43 fill: black } ]]>
44 </style>
45
46 <filter id="gaussianBlur" filterUnits="userSpaceOnUse" x="-100" y="-100" width="200" height="200" filterRes="200">
47 <feGaussianBlur stdDeviation="2 2" x="-100" y="-50" width="200" height="100"/>
48 </filter>
49
50 <text x="0" y="0" text-anchor="middle" id="sample">sample</text>
51
52 </defs>
53
54 <g id="testContent" text-anchor="middle">
55 <text class="title" x="50%" y="10%" font-size="15" >
56 Text Alignment, Geometry, References, and Spans</text>
57
58 <g font-size="15">
59 <line x1="50%" y1="14%" x2="50%" y2="28%" stroke="Gray" stroke-width="1"/>
60 <text x="50%" y="18%" text-anchor="start" fill="MidnightBlue">
61 text-anchor="start"</text>
62 <text x="50%" y="22%" text-anchor="middle" fill="DarkRed">
63 text-anchor="middle"</text>
64 <text x="50%" y="26%" text-anchor="end" fill="ForestGreen">
65 text-anchor="end"</text>
66 </g>
67
68
69 <g transform="translate(100, 180)">
70 <text font-size="1cm">sample</text>
71 <text y="15" style="Caption">font-size="1cm"</text>
72 </g>
73
74 <g transform="translate(225, 180)">
75 <text font-size="200%">sample</text>
76 <text y="15" style="Caption">font-size="200%"</text>
77 </g>
78
79 <g transform="translate(350, 180)">
80 <text font-size="30pt">sample</text>
81 <text y="15" style="Caption">font-size="28"</text>
82 </g>
83
84 <g transform="translate(100, 225)">
85 <text font-size="30"><tref xlink:href="#sample"/></text>
86 <text y="15" style="Caption">referenced text via &lt;tref&gt;</text>
87 </g>
88
89 <g transform="translate(225, 225)">
90 <text font-size="30">
91 sa<tspan font-family="Serif" font-weight="bold" fill="DarkRed"
92 text-decoration="underline" >m</tspan>ple
93 </text>
94 <text y="15" style="Caption">use of &lt;tspan&gt;</text>
95 </g>
96
97 <g transform="translate(350, 225)">
98 <g font-size="30">
99 <use xlink:href="#sample"/>
100 </g>
101 <text y="15" style="Caption">predefined text via &lt;use&gt;</text>
102 </g>
103
104 <text x="50%" y="280" font-size="15" >
105 Text Rendering Properties</text>
106
107 <g transform="translate(100, 305)">
108 <g font-size="30" transform="rotate(180)">
109 <use xlink:href="#sample"/>
110 </g>
111 <text y="30" style="Caption">transform="rotate(180)"</text>
112 </g>
113
114 <g transform="translate(225, 320)">
115 <g font-size="30" opacity="0.5">
116 <use xlink:href="#sample"/>
117 </g>
118 <text y="15" style="Caption">opacity="0.5"</text>
119 </g>
120
121 <g transform="translate(350, 320)">
122 <g font-size="30" fill="DarkRed">
123 <use xlink:href="#sample"/>
124 </g>
125 <text y="15" style="Caption">fill="DarkRed"</text>
126 </g>
127
128 <g transform="translate(100, 370)">
129 <g font-size="30" filter="url(#gaussianBlur)">
130 <use xlink:href="#sample"/>
131 </g>
132 <text y="15" style="Caption">filter="url(#gaussianBlur)"</text>
133 </g>
134
135 <g transform="translate(225, 370)">
136 <g font-size="30" fill="yellow" stroke="MidnightBlue">
137 <use xlink:href="#sample"/>
138 </g>
139 <text y="15" style="Caption">fill="yellow";</text>
140 <text y="25" style="Caption">stroke="MidnightBlue"</text>
141 </g>
142
143 <defs>
144 <clipPath id="textClip">
145 <text font-size="30">sample</text>
146 </clipPath>
147 <linearGradient id="gradient" gradientUnits="userSpaceOnUse"
148 x1="-50" y1="-25" x2="50" y2="25">
149 <stop offset="0%" style="stop-color:blue"/>
150 <stop offset="100%" style="stop-color:green"/>
151 </linearGradient>
152 </defs>
153 <g transform="translate(350, 370)">
154 <rect x="-50" y="-25" width="100" height="50"
155 fill="url(#gradient)"
156 clip-path="url(#textClip)"/>
157 <text y="15" style="Caption">text as clip-path</text>
158 </g>
159
160 <text x="150" y="440" font-size="60"
161 fill="BlancheDalmond" stroke="DarkRed" stroke-width="2"
162 stroke-linejoin="miter" stroke-linecap="square">
163 a</text>
164 <text x="150" y="455" style="Caption">stroke-linejoin="miter"</text>
165 <text x="150" y="465" style="Caption">stroke-linecap="square"</text>
166
167 <text x="300" y="440" font-size="60"
168 fill="BlancheDalmond" stroke="DarkRed" stroke-width="2"
169 stroke-linejoin="round" stroke-linecap="round">
170 a</text>
171 <text x="300" y="455" style="Caption">stroke-linejoin="round"</text>
172 <text x="300" y="465" style="Caption">stroke-linecap="round"</text>
173
174 </g>
175
176 <!-- ============================================================= -->
177 <!-- Batik sample mark -->
178 <!-- ============================================================= -->
179 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
180
181 </svg>