Debian Codegraph @

test_non_regression/svg/painting-marker-02-f.svg

raw
1 <svg version="1.1" baseProfile="full" id="svg-root"
2 width="100%" height="100%" viewBox="0 0 480 360"
3 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= SVG 1.1 2nd Edition Test Case =-->
6 <!--======================================================================-->
7 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
8 <!--= Institute of Technology, European Research Consortium for =-->
9 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
10 <!--= All Rights Reserved. =-->
11 <!--= See http://www.w3.org/Consortium/Legal/. =-->
12 <!--======================================================================-->
13 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
14 template-version="1.4" reviewer="SVGWG" author="Dean Jackson" status="accepted"
15 version="$Revision: 1.7 $" testname="$RCSfile: painting-marker-02-f.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/painting.html#Markers">
17 <p>
18 Tests the rendering of markers, specifically property inheritance. For the four tests, there should
19 be two identical paths with markers drawn.
20 </p>
21 <p>
22 The top two tests examine the rendering of markers when the marker and the path
23 referencing it share the same parent and all painting properties are specfied on
24 that parent. The first test show inheritance of the 'fill' property and the
25 second the inheritance of the 'paint' property. In both tests, the marker
26 is painting using the same properties as the referencing object. Because of
27 scaling transformations on the marker, the stroke on the second test is thinner
28 than on the referencing object.
29 </p>
30 <p>
31 The third and fourth tests examine the rendering of markers in a situation where the
32 marker and referencing path do NOT share the same parent and painting
33 properties are specified both on the parent of the marked path and on the contents
34 of the marker itself. In both cases, the marker's parent specifies
35 fill="green" stroke="blue" stroke-width="8". For the third test, the marker contents
36 override with stroke="black". For the fourth test, the marker contents
37 override with fill="black". In neither case should you see
38 fill="orange" or stroke="blue" or "stroke="purple" on the markers as these properties
39 are specified on the ancestor of the referencing object or the referencing object itself
40 and thus shouldn't affect the marker.
41 </p>
42 </d:testDescription>
43 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
44 <p>
45 Run the test. No interaction required.
46 </p>
47 </d:operatorScript>
48 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
49 <p>
50 The path on the left is rendered using the marker elements.
51 The path on the right is rendered using the equivalent SVG,
52 showing what the marked path should look like. These should be
53 identical and match the image to the right.
54 </p>
55 </d:passCriteria>
56 </d:SVGTestCase>
57 <title id="test-title">$RCSfile: painting-marker-02-f.svg,v $</title>
58 <defs>
59 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
60 <font-face-src>
61 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
62 </font-face-src>
63 </font-face>
64 </defs>
65 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
66 <defs>
67 <clipPath id="overflowHiddenClip1" clipPathUnits="userSpaceOnUse">
68 <rect x="0" y="0" width="2" height="2"/>
69 </clipPath>
70 <clipPath id="overflowHiddenClip" clipPathUnits="userSpaceOnUse">
71 <rect x="0" y="0" width="4" height="4"/>
72 </clipPath>
73 </defs>
74 <g fill="green">
75 <text x="125" y="30" font-size="14" fill="black">Marker Rendering Properties</text>
76 <!-- ===================================================================== -->
77 <!-- Fill property -->
78 <!-- ===================================================================== -->
79 <g fill="black" stroke="none" stroke-width="8">
80 <marker id="marker1" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth">
81 <rect width="10" height="10"/>
82 </marker>
83 <text x="100" y="140" font-size="10" fill="black" stroke="none">Fill Property</text>
84 <path marker-start="url(#marker1)" marker-mid="url(#marker1)" marker-end="url(#marker1)" d="M 30 60 L 80 60 L 80 110 Z"/>
85 <!-- ===================================================================== -->
86 <!-- Generate the equivalent SVG -->
87 <!-- ===================================================================== -->
88 <g transform="translate(120,0)">
89 <path d="M 30 60 L 80 60 L 80 110 Z"/>
90 <g transform="translate(30,60) scale(8) translate(-1, -1)">
91 <g clip-path="url(#overflowHiddenClip1)">
92 <g transform="scale(0.2, 0.2)">
93 <rect width="10" height="10"/>
94 </g>
95 </g>
96 </g>
97 <g transform="translate(80,60) scale(8) translate(-1, -1)">
98 <g clip-path="url(#overflowHiddenClip1)">
99 <g transform="scale(0.2, 0.2)">
100 <rect width="10" height="10"/>
101 </g>
102 </g>
103 </g>
104 <g transform="translate(80,110) scale(8) translate(-1, -1)">
105 <g clip-path="url(#overflowHiddenClip1)">
106 <g transform="scale(0.2, 0.2)">
107 <rect width="10" height="10"/>
108 </g>
109 </g>
110 </g>
111 </g>
112 </g>
113 <!-- ===================================================================== -->
114 <!-- Stroke property -->
115 <!-- ===================================================================== -->
116 <g fill="none" stroke="black" stroke-width="4">
117 <marker id="marker2" viewBox="0 0 20 20" markerWidth="4" markerHeight="4" refX="10" refY="10" markerUnits="strokeWidth">
118 <rect width="20" height="20"/>
119 </marker>
120 <text x="340" y="140" font-size="10" fill="black" stroke="none">Stroke Property</text>
121 <path marker-start="url(#marker2)" marker-mid="url(#marker2)" marker-end="url(#marker2)" d="M 270 60 L 320 60 L 320 110 Z"/>
122 <!-- ===================================================================== -->
123 <!-- Generate the equivalent SVG -->
124 <!-- ===================================================================== -->
125 <g transform="translate(120,0)">
126 <path d="M 270 60 L 320 60 L 320 110 Z"/>
127 <!-- ===================================================================== -->
128 <!-- Generate the equivalent SVG -->
129 <!-- ===================================================================== -->
130 <g transform="translate(270,60) scale(4) translate(-2, -2)">
131 <g clip-path="url(#overflowHiddenClip)">
132 <g transform="scale(0.2, 0.2)">
133 <rect width="20" height="20"/>
134 </g>
135 </g>
136 </g>
137 <g transform="translate(320,60) scale(4) translate(-2, -2)">
138 <g clip-path="url(#overflowHiddenClip)">
139 <g transform="scale(0.2, 0.2)">
140 <rect width="20" height="20"/>
141 </g>
142 </g>
143 </g>
144 <g transform="translate(320, 110) scale(4) translate(-2, -2)">
145 <g clip-path="url(#overflowHiddenClip)">
146 <g transform="scale(0.2, 0.2)">
147 <rect width="20" height="20"/>
148 </g>
149 </g>
150 </g>
151 </g>
152 </g>
153 <!-- ===================================================================== -->
154 <!-- Define marker element with parents setting painting properties -->
155 <!-- ===================================================================== -->
156 <g fill="green" stroke="blue" stroke-width="8">
157 <marker id="marker3" viewBox="0 0 20 20" markerWidth="4" markerHeight="4" refX="10" refY="10" markerUnits="strokeWidth">
158 <rect width="20" height="20" stroke="black"/>
159 </marker>
160 <marker id="marker4" viewBox="0 0 10 10" markerWidth="4" markerHeight="4" refX="5" refY="5" markerUnits="strokeWidth">
161 <rect width="10" height="10" fill="black" stroke-width="4"/>
162 </marker>
163 </g>
164 <!-- ===================================================================== -->
165 <!-- Parent and specified properties -->
166 <!-- ===================================================================== -->
167 <g fill="orange" stroke="blue">
168 <text x="90" y="270" font-size="10" fill="black" stroke="none">Mixed Properties</text>
169 <path stroke="purple" stroke-width="4" marker-start="url(#marker3)" marker-mid="url(#marker3)" marker-end="url(#marker3)" d="M 30 190 L 80 190 L 80 240 Z"/>
170 <!-- ===================================================================== -->
171 <!-- Generate the equivalent SVG -->
172 <!-- ===================================================================== -->
173 <g transform="translate(120,0)">
174 <path stroke="purple" stroke-width="4" d="M 30 190 L 80 190 L 80 240 Z"/>
175 <g fill="green" stroke="black" stroke-width="8">
176 <g transform="translate(30,190) scale(4) translate(-2, -2)">
177 <g clip-path="url(#overflowHiddenClip)">
178 <g transform="scale(.2, .2)">
179 <rect width="20" height="20"/>
180 </g>
181 </g>
182 </g>
183 <g transform="translate(80,190) scale(4) translate(-2, -2)">
184 <g clip-path="url(#overflowHiddenClip)">
185 <g transform="scale(0.2, 0.2)">
186 <rect width="20" height="20"/>
187 </g>
188 </g>
189 </g>
190 <g transform="translate(80,240) scale(4) translate(-2, -2)">
191 <g clip-path="url(#overflowHiddenClip)">
192 <g transform="scale(0.2, 0.2)">
193 <rect width="20" height="20"/>
194 </g>
195 </g>
196 </g>
197 </g>
198 </g>
199 </g>
200 <g fill="orange" stroke="green">
201 <text x="340" y="270" font-size="10" fill="black" stroke="none">Mixed Properties</text>
202 <path stroke="purple" stroke-width="4" marker-start="url(#marker4)" marker-mid="url(#marker4)" marker-end="url(#marker4)" d="M 270 190 L 320 190 L 320 240 Z"/>
203 <!-- ===================================================================== -->
204 <!-- Generate the equivalent SVG -->
205 <!-- ===================================================================== -->
206 <g transform="translate(120,0)">
207 <path stroke="purple" stroke-width="4" d="M 270 190 L 320 190 L 320 240 Z"/>
208 <g fill="black" stroke="blue" stroke-width="4">
209 <g transform="translate(270,190) scale(4) translate(-2, -2)">
210 <g clip-path="url(#overflowHiddenClip)">
211 <g transform="scale(0.4, 0.4)">
212 <rect width="10" height="10"/>
213 </g>
214 </g>
215 </g>
216 <g transform="translate(320,190) scale(4) translate(-2, -2)">
217 <g clip-path="url(#overflowHiddenClip)">
218 <g transform="scale(0.4, 0.4)">
219 <rect width="10" height="10"/>
220 </g>
221 </g>
222 </g>
223 <g transform="translate(320,240) scale(4) translate(-2, -2)">
224 <g clip-path="url(#overflowHiddenClip)">
225 <g transform="scale(0.4, 0.4)">
226 <rect width="10" height="10"/>
227 </g>
228 </g>
229 </g>
230 </g>
231 </g>
232 </g>
233 </g>
234 </g>
235 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
236 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
237 </g>
238 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
239 <!-- comment out this watermark once the test is approved -->
240 <!--<g id="draft-watermark">
241 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
242 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
243 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
244 </g>-->
245 </svg>