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">
7 Copyright 2001-2002 The Apache Software Foundation
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
22 <!-- ========================================================================= -->
23 <!-- Test description here -->
25 <!-- @author bill.haneman@ireland.sun.com -->
26 <!-- @version $Id: textProperties.svg,v 1.6 2004/08/18 07:12:23 vhardy Exp $ -->
27 <!-- ========================================================================= -->
28 <?xml-stylesheet type=
"text/css" href=
"../resources/test.css" ?>
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 <title>Text Properties
</title>
33 <!-- ============================================================= -->
35 <!-- ============================================================= -->
39 <style type=
"text/css"><![CDATA[
40 .Caption { font-size:
8px; font-family: dialog; font-weight: normal;
41 font-style: normal; stroke: none; stroke-width:
0;
45 <filter id=
"gaussianBlur" filterUnits=
"userSpaceOnUse" x=
"-100" y=
"-100" width=
"200" height=
"200" filterRes=
"200">
46 <feGaussianBlur stdDeviation=
"2 2" x=
"-100" y=
"-50" width=
"200" height=
"100"/>
49 <text x=
"0" y=
"0" text-anchor=
"middle" id=
"sample">sample
</text>
53 <g id=
"testContent" text-anchor=
"middle">
54 <text class=
"title" x=
"50%" y=
"10%" font-size=
"15" >
55 Text Alignment, Geometry, References, and Spans
</text>
58 <line x1=
"50%" y1=
"14%" x2=
"50%" y2=
"28%" stroke=
"Gray" stroke-width=
"1"/>
59 <text x=
"50%" y=
"18%" text-anchor=
"start" fill=
"MidnightBlue">
60 text-anchor=
"start"</text>
61 <text x=
"50%" y=
"22%" text-anchor=
"middle" fill=
"DarkRed">
62 text-anchor=
"middle"</text>
63 <text x=
"50%" y=
"26%" text-anchor=
"end" fill=
"ForestGreen">
64 text-anchor=
"end"</text>
68 <g transform=
"translate(100, 180)">
69 <text font-size=
"1cm">sample
</text>
70 <text y=
"15" style=
"Caption">font-size=
"1cm"</text>
73 <g transform=
"translate(225, 180)">
74 <text font-size=
"200%">sample
</text>
75 <text y=
"15" style=
"Caption">font-size=
"200%"</text>
78 <g transform=
"translate(350, 180)">
79 <text font-size=
"30pt">sample
</text>
80 <text y=
"15" style=
"Caption">font-size=
"28"</text>
83 <g transform=
"translate(100, 225)">
84 <text font-size=
"30"><tref xlink:
href=
"#sample"/></text>
85 <text y=
"15" style=
"Caption">referenced text via
<tref
></text>
88 <g transform=
"translate(225, 225)">
90 sa
<tspan font-family=
"Serif" font-weight=
"bold" fill=
"DarkRed"
91 text-decoration=
"underline" >m
</tspan>ple
93 <text y=
"15" style=
"Caption">use of
<tspan
></text>
96 <g transform=
"translate(350, 225)">
98 <use xlink:
href=
"#sample"/>
100 <text y=
"15" style=
"Caption">predefined text via
<use
></text>
103 <text x=
"50%" y=
"280" font-size=
"15" >
104 Text Rendering Properties
</text>
106 <g transform=
"translate(100, 305)">
107 <g font-size=
"30" transform=
"rotate(180)">
108 <use xlink:
href=
"#sample"/>
110 <text y=
"30" style=
"Caption">transform=
"rotate(180)"</text>
113 <g transform=
"translate(225, 320)">
114 <g font-size=
"30" opacity=
"0.5">
115 <use xlink:
href=
"#sample"/>
117 <text y=
"15" style=
"Caption">opacity=
"0.5"</text>
120 <g transform=
"translate(350, 320)">
121 <g font-size=
"30" fill=
"DarkRed">
122 <use xlink:
href=
"#sample"/>
124 <text y=
"15" style=
"Caption">fill=
"DarkRed"</text>
127 <g transform=
"translate(100, 370)">
128 <g font-size=
"30" filter=
"url(#gaussianBlur)">
129 <use xlink:
href=
"#sample"/>
131 <text y=
"15" style=
"Caption">filter=
"url(#gaussianBlur)"</text>
134 <g transform=
"translate(225, 370)">
135 <g font-size=
"30" fill=
"yellow" stroke=
"MidnightBlue">
136 <use xlink:
href=
"#sample"/>
138 <text y=
"15" style=
"Caption">fill=
"yellow";
</text>
139 <text y=
"25" style=
"Caption">stroke=
"MidnightBlue"</text>
143 <clipPath id=
"textClip">
144 <text font-size=
"30">sample
</text>
146 <linearGradient id=
"gradient" gradientUnits=
"userSpaceOnUse"
147 x1=
"-50" y1=
"-25" x2=
"50" y2=
"25">
148 <stop offset=
"0%" style=
"stop-color:blue"/>
149 <stop offset=
"100%" style=
"stop-color:green"/>
152 <g transform=
"translate(350, 370)">
153 <rect x=
"-50" y=
"-25" width=
"100" height=
"50"
154 fill=
"url(#gradient)"
155 clip-path=
"url(#textClip)"/>
156 <text y=
"15" style=
"Caption">text as clip-path
</text>
159 <text x=
"150" y=
"440" font-size=
"60"
160 fill=
"BlancheDalmond" stroke=
"DarkRed" stroke-width=
"2"
161 stroke-linejoin=
"miter" stroke-linecap=
"square">
163 <text x=
"150" y=
"455" style=
"Caption">stroke-linejoin=
"miter"</text>
164 <text x=
"150" y=
"465" style=
"Caption">stroke-linecap=
"square"</text>
166 <text x=
"300" y=
"440" font-size=
"60"
167 fill=
"BlancheDalmond" stroke=
"DarkRed" stroke-width=
"2"
168 stroke-linejoin=
"round" stroke-linecap=
"round">
170 <text x=
"300" y=
"455" style=
"Caption">stroke-linejoin=
"round"</text>
171 <text x=
"300" y=
"465" style=
"Caption">stroke-linecap=
"round"</text>
175 <!-- ============================================================= -->
176 <!-- Batik sample mark -->
177 <!-- ============================================================= -->
178 <use xlink:
href=
"../resources/batikLogo.svg#Batik_Tag_Box" />