Debian Codegraph @

samples/tests/spec/painting/markersExt.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 <!-- This test validates arcto and multiple move to -->
25 <!-- -->
26 <!-- @author [email protected] -->
27 <!-- @version $Id$ -->
28 <!-- ====================================================================== -->
29 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
30
31 <svg id="body" width="450" height="500" viewBox="0 0 450 500"
32 xmlns="http://www.w3.org/2000/svg"
33 xmlns:xlink="http://www.w3.org/1999/xlink" >
34
35 <title>Marker Test</title>
36
37 <style type="text/css"><![CDATA[
38 .markedPath { fill:none; stroke:black; stroke-width:4; }
39 .label { filter:url(#textBG); }
40 ]]></style>
41
42 <g id="content">
43
44 <g transform="translate(0, 40)">
45 <text class="title" x="50%" y="0">Markers on paths with just moves</text>
46 <text class="title" x="50%" y="1em">and elliptical arcs</text>
47 </g>
48
49 <defs>
50 <filter id="textBG" x="-5%" y="-5%" width="110%" height="110%"
51 color-interpolation-filters="sRGB">
52 <feFlood flood-color="lightGrey" result="foo"/>
53 <feComposite in="SourceGraphic" in2="foo" />
54 </filter>
55
56 <path id="testPathMoves" d="M 0 0 m 60 0 m 60 0" />
57
58 <path id="testPathMoves2" d="M 0 0 m 40 -15 m 40 30 m 40 -15" />
59
60 <path id="testPathArcs1"
61 d="M 0 0 a 50 30 30 1 1 60 0 a 50 30 30 1 0 60 0" />
62
63 <path id="testPathArcs2"
64 d="M 0 0 a 60 30 0 1 1 60 0 a 60 30 0 1 0 60 0" />
65
66 <path id="testPathArcs3"
67 d="M 0 0 a 30 15 0 1 1 60 0 a 30 15 0 1 0 60 0" />
68
69 <path id="testPathArcs4"
70 d="M 0 0 a 60 30 0 0 1 60 0 a 60 30 0 0 0 60 0" />
71
72 <path id="testPathArcs5"
73 d="M 0 0
74 a 60 30 30 0 1 40 -15
75 a 60 30 30 0 0 40 30
76 a 60 30 30 0 0 40 -15" />
77
78
79 <g id="crossHair" style="marker:none" stroke="black">
80 <line y1="-5" x2="0" y2="5" />
81 <line x1="-5" x2="5" y2="0" />
82 </g>
83
84 <g id="startEndCrossHairs">
85 <use x="0" y="20" xlink:href="#crossHair" />
86 <use x="30" y="0" xlink:href="#crossHair" />
87 </g>
88
89 <g id="startMidEndCrossHairs">
90 <use x="0" y="20" xlink:href="#crossHair" />
91 <use x="20" y="0" xlink:href="#crossHair" />
92 <use x="50" y="10" xlink:href="#crossHair" />
93 </g>
94
95 <g id="testPathCrossHairs">
96 <use xlink:href="#crossHair" />
97 <use x="60" xlink:href="#crossHair" />
98 <use x="120" xlink:href="#crossHair" />
99 </g>
100
101 <g id="testPathCrossHairs2">
102 <use xlink:href="#crossHair" />
103 <use x="40" y="-15" xlink:href="#crossHair" />
104 <use x="80" y="15" xlink:href="#crossHair" />
105 <use x="120" xlink:href="#crossHair" />
106 </g>
107
108 <!-- ============================= -->
109 <!-- Simple Marker Definition -->
110 <!-- ============================= -->
111 <marker id="markerStart" markerWidth="20" markerHeight="20"
112 viewBox="-1 -1 2 2" orient="auto" refX="0" refY="0"
113 markerUnits="strokeWidth" overflow="visible">
114 <g opacity="0.5">
115 <circle r="1.8" stroke="black" fill="blue" stroke-width=".4" />
116 <path d="M 0 -1.8 L 0.3 -0.3 L 1.8 0 L 0.3 0.3 L 0 1.8 L -.2 0.3 L -1.8 0 L -0.3 -0.3 Z"
117 fill="yellow" stroke="none" />
118 <circle r="0.2" cx="0" cy="-1.8" fill="gold"/>
119 </g>
120 </marker>
121
122 <marker id="markerMid" markerWidth="20" markerHeight="20"
123 viewBox="-1 -1 2 2" orient="auto" refX="0" refY="0"
124 markerUnits="strokeWidth" overflow="visible">
125 <g opacity="0.5">
126 <circle r="1.8" stroke="black" fill="crimson" stroke-width=".4" />
127 <path d="M 0 -1.8 L 0.3 -0.3 L 1.8 0 L 0.3 0.3 L 0 1.8 L -.2 0.3 L -1.8 0 L -0.3 -0.3 Z"
128 fill="yellow" stroke="none" />
129 <circle r="0.2" cx="0" cy="-1.8" fill="gold"/>
130 </g>
131 </marker>
132
133 <marker id="markerEnd" markerWidth="20" markerHeight="20"
134 viewBox="-1 -1 2 2" orient="auto" refX="0" refY="0"
135 markerUnits="strokeWidth" overflow="visible">
136 <g opacity="0.5">
137 <circle r="1.8" stroke="black" fill="green" stroke-width=".4" />
138 <path d="M 0 -1.8 L 0.3 -0.3 L 1.8 0 L 0.3 0.3 L 0 1.8 L -.2 0.3 L -1.8 0 L -0.3 -0.3 Z"
139 fill="yellow" stroke="none" />
140 <circle r="0.2" cx="0" cy="-1.8" fill="gold"/>
141 </g>
142 </marker>
143
144 </defs>
145
146 <g transform="translate(50, 100)">
147
148 <!-- ==================================== -->
149 <!-- Move Tests -->
150 <!-- ==================================== -->
151 <g transform="translate(0, 0)" >
152 <!-- Top reference point -->
153 <use xlink:href="#testPathMoves"
154 marker-start="url(#markerStart)"
155 marker-mid="url(#markerMid)"
156 marker-end="url(#markerEnd)"
157 class="markedPath" style="stroke-width:1"/>
158 <use xlink:href="#testPathCrossHairs" />
159
160 <g class="label" transform="translate(60, 35)" text-anchor="middle">
161 <text y="0">Simple test of multiple moves</text>
162 </g>
163 </g>
164
165 <!-- ==================================== -->
166 <!-- Move Tests2 -->
167 <!-- ==================================== -->
168 <g transform="translate(230, 0)" >
169 <!-- Top reference point -->
170 <use xlink:href="#testPathMoves2"
171 marker-start="url(#markerStart)"
172 marker-mid="url(#markerMid)"
173 marker-end="url(#markerEnd)"
174 class="markedPath" style="stroke-width:1"/>
175 <use xlink:href="#testPathCrossHairs2" />
176
177 <g class="label" transform="translate(60, 50)" text-anchor="middle">
178 <text y="0">Another test of multiple moves</text>
179 </g>
180 </g>
181
182 <!-- ==================================== -->
183 <!-- Arc Test 1 -->
184 <!-- ==================================== -->
185 <g transform="translate(0, 110)" >
186 <!-- Top reference point -->
187 <use xlink:href="#testPathArcs1"
188 marker-start="url(#markerStart)"
189 marker-mid="url(#markerMid)"
190 marker-end="url(#markerEnd)"
191 class="markedPath" style="stroke-width:1"/>
192 <use xlink:href="#testPathCrossHairs" />
193
194 <g class="label" transform="translate(60, 50)"
195 text-anchor="middle">
196 <text y="0">Test of rotated arcs</text>
197 </g>
198 </g>
199
200
201
202 <!-- ==================================== -->
203 <!-- Arc Test 2 -->
204 <!-- ==================================== -->
205 <g transform="translate(230, 110)" >
206 <!-- Top reference point -->
207 <use xlink:href="#testPathArcs2"
208 marker-start="url(#markerStart)"
209 marker-mid="url(#markerMid)"
210 marker-end="url(#markerEnd)"
211 class="markedPath" style="stroke-width:1"/>
212 <use xlink:href="#testPathCrossHairs" />
213
214 <g class="label" transform="translate(60, 50)" text-anchor="middle">
215 <text y="0">Test of arcs 2</text>
216 </g>
217 </g>
218
219
220
221 <!-- ==================================== -->
222 <!-- Arc Test 3 -->
223 <!-- ==================================== -->
224 <g transform="translate(0, 220)" >
225 <!-- Top reference point -->
226 <use xlink:href="#testPathArcs3"
227 marker-start="url(#markerStart)"
228 marker-mid="url(#markerMid)"
229 marker-end="url(#markerEnd)"
230 class="markedPath" style="stroke-width:1"/>
231 <use xlink:href="#testPathCrossHairs" />
232
233 <g class="label" transform="translate(60, 50)" text-anchor="middle">
234 <text y="0">Test of arcs 3</text>
235 </g>
236 </g>
237
238
239
240 <!-- ==================================== -->
241 <!-- Arc Test 4 -->
242 <!-- ==================================== -->
243 <g transform="translate(230, 220)" >
244 <!-- Top reference point -->
245 <use xlink:href="#testPathArcs4"
246 marker-start="url(#markerStart)"
247 marker-mid="url(#markerMid)"
248 marker-end="url(#markerEnd)"
249 class="markedPath" style="stroke-width:1"/>
250 <use xlink:href="#testPathCrossHairs" />
251
252 <g class="label" transform="translate(60, 50)" text-anchor="middle">
253 <text y="0">Test of arcs 4</text>
254 </g>
255 </g>
256
257
258 <!-- ==================================== -->
259 <!-- Arc Test 5 -->
260 <!-- ==================================== -->
261 <g transform="translate(115, 320)" >
262 <!-- Top reference point -->
263 <use xlink:href="#testPathArcs5"
264 marker-start="url(#markerStart)"
265 marker-mid="url(#markerMid)"
266 marker-end="url(#markerEnd)"
267 class="markedPath" style="stroke-width:1"/>
268 <use xlink:href="#testPathCrossHairs2" />
269
270 <g class="label" transform="translate(60, 50)" text-anchor="middle">
271 <text y="0">Test of arcs 5</text>
272 </g>
273 </g>
274
275
276 </g>
277 </g>
278
279 <!-- ============================================================= -->
280 <!-- Batik sample mark -->
281 <!-- ============================================================= -->
282 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
283
284 </svg>