1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3 <!--======================================================================-->
4 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
5 <!--= Institute of Technology, Institut National de Recherche en =-->
6 <!--= Informatique et en Automatique, Keio University). All Rights =-->
7 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
8 <!--======================================================================-->
9 <!-- ===================================================================== -->
11 <!-- paint-markers-BE-03.svg -->
12 <!-- renamed for 1.1 suite to painting-marker-01-f.svg -->
14 <!-- Tests Marker support -->
16 <!-- Author : Dean Jackson 06-08-2000 -->
17 <!-- 1.1 revision by Rick Graham -->
20 <!-- 06 08 2000, DJ, created -->
22 <!-- ===================================================================== -->
23 <!--======================================================================-->
24 <!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
25 <!--= log messages, and therefore is no longer in the preceding preamble.=-->
26 <!--======================================================================-->
27 <svg version=
"1.1" baseProfile=
"full" xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" id=
"svg-root" width=
"100%" height=
"100%" viewBox=
"0 0 480 360">
28 <SVGTestCase xmlns=
"http://www.w3.org/2000/02/svg/testsuite/description/">
29 <OperatorScript version=
"$Revision: 1.8 $" testname=
"painting-marker-01-f.svg">
30 <Paragraph>Tests the basic support for markers. For the three tests, there
31 should be two identical paths with markers drawn. The path on the left is
32 rendered using the marker elements. The path on the right is rendered using
33 the equivalent SVG, showing what the marked path should look like.
36 The top test examines the basic support for the marker element and style. The markers are red rectangles.
39 The middle test examines the support for the different styles of marker properties. The
40 "marker-start" property defines the marker to use at the first vertex of the marked path,
41 in this case a red rectangle. The
"marker-end" property defines the marker to use at the
42 last vertex of the marked path, in this case a blue triangle. The
"marker-mid" property
43 defines the marker to use at all vertices, other than the first and last, of the marked path,
44 in this case a green circle.
46 <Paragraph>The bottom test examines the support for marker orientation along the
47 path direction. The second vertex, the top right corner of the path, has a marker that
48 is rotated
45 degrees, since that is the average of the horizontal and vertical segments
49 each side. The last vertex, the bottom right corner of the path, has a marker rotated
90
50 degrees since that is the direction of the last path segment.
53 The rendered picture should match the reference image, except for possible
54 variations in the labelling text (per CSS2 rules).
58 <title id=
"test-title">painting-marker-
01-f.svg
</title>
59 <desc id=
"test-desc">Checks if viewer can handle marker elements on paths
</desc>
60 <!--======================================================================-->
61 <!--Content of Test Case follows... =====================-->
62 <!--======================================================================-->
63 <g id=
"test-body-content">
64 <!-- ===================================================================== -->
65 <!-- Define a few simple marker elements -->
66 <!-- ===================================================================== -->
67 <marker id=
"marker1" viewBox=
"0 0 10 10" markerWidth=
"2" markerHeight=
"2" refX=
"5" refY=
"5" markerUnits=
"strokeWidth">
68 <rect width=
"10" height=
"10" fill=
"red" stroke=
"none"/>
70 <marker id=
"marker2" viewBox=
"0 0 10 10" markerWidth=
"2" markerHeight=
"2" refX=
"5" refY=
"5" markerUnits=
"strokeWidth" orient=
"auto">
71 <path d=
"M 5 0 L 10 10 L 0 10 Z" fill=
"blue" stroke=
"none"/>
73 <marker id=
"markerStart" viewBox=
"0 0 10 10" markerWidth=
"2" markerHeight=
"2" refX=
"5" refY=
"5" markerUnits=
"strokeWidth">
74 <rect width=
"10" height=
"10" fill=
"red" stroke=
"none"/>
76 <marker id=
"markerMiddle" viewBox=
"0 0 10 10" markerWidth=
"2" markerHeight=
"2" refX=
"5" refY=
"5" markerUnits=
"strokeWidth">
77 <circle cx=
"5" cy=
"5" r=
"5" fill=
"green" stroke=
"none"/>
79 <marker id=
"markerEnd" viewBox=
"0 0 10 10" markerWidth=
"2" markerHeight=
"2" refX=
"5" refY=
"5" markerUnits=
"strokeWidth">
80 <path d=
"M 5 0 L 10 10 L 0 10 Z" fill=
"blue" stroke=
"none"/>
82 <!-- ===================================================================== -->
83 <!-- Basic Marker Test -->
84 <!-- ===================================================================== -->
85 <text x=
"170" y=
"30" font-family=
"Arial" font-size=
"14">Basic Markers
</text>
86 <path fill=
"none" stroke=
"black" stroke-width=
"8" marker-start=
"url(#marker1)" marker-mid=
"url(#marker1)" marker-end=
"url(#marker1)" d=
"M 130 40 L 180 40 L 180 90"/>
87 <!-- ===================================================================== -->
88 <!-- Generate the equivalent SVG -->
89 <!-- ===================================================================== -->
90 <g transform=
"translate(120,0)">
91 <path fill=
"none" stroke=
"black" stroke-width=
"8" d=
"M 130 40 L 180 40 L 180 90"/>
92 <g transform=
"translate(130,40) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
93 <rect width=
"10" height=
"10" fill=
"red" stroke=
"none"/>
95 <g transform=
"translate(180,40) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
96 <rect width=
"10" height=
"10" fill=
"red" stroke=
"none"/>
98 <g transform=
"translate(180,90) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
99 <rect width=
"10" height=
"10" fill=
"red" stroke=
"none"/>
102 <!-- ===================================================================== -->
103 <!-- Start, Middle and End Marker Test -->
104 <!-- ===================================================================== -->
105 <text x=
"145" y=
"125" font-family=
"Arial" font-size=
"14">Start, Middle and End
</text>
106 <path fill=
"none" stroke=
"black" stroke-width=
"8" marker-start=
"url(#markerStart)" marker-mid=
"url(#markerMiddle)" marker-end=
"url(#markerEnd)" d=
"M 130 135 L 180 135 L 180 185"/>
107 <!-- ===================================================================== -->
108 <!-- Generate the equivalent SVG -->
109 <!-- ===================================================================== -->
110 <g transform=
"translate(120,0)">
111 <path fill=
"none" stroke=
"black" stroke-width=
"8" d=
"M 130 135 L 180 135 L 180 185"/>
112 <g transform=
"translate(130,135) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
113 <rect width=
"10" height=
"10" fill=
"red" stroke=
"none"/>
115 <g transform=
"translate(180,135) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
116 <circle cx=
"5" cy=
"5" r=
"5" fill=
"green" stroke=
"none"/>
118 <g transform=
"translate(180,185) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
119 <path d=
"M 5 0 L 10 10 L 0 10 Z" fill=
"blue" stroke=
"none"/>
122 <!-- ===================================================================== -->
123 <!-- Auto Orientation Marker Test -->
124 <!-- ===================================================================== -->
125 <text x=
"145" y=
"220" font-family=
"Arial" font-size=
"14">Automatic Orientation
</text>
126 <path fill=
"none" stroke=
"black" stroke-width=
"8" marker-start=
"url(#marker2)" marker-mid=
"url(#marker2)" marker-end=
"url(#marker2)" d=
"M 130 230 L 180 230 L 180 280"/>
127 <!-- ===================================================================== -->
128 <!-- Generate the equivalent SVG -->
129 <!-- ===================================================================== -->
130 <g transform=
"translate(120,0)">
131 <path fill=
"none" stroke=
"black" stroke-width=
"8" d=
"M 130 230 L 180 230 L 180 280"/>
132 <g transform=
"translate(130,230) rotate(0) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
133 <path d=
"M 5 0 L 10 10 L 0 10 Z" fill=
"blue" stroke=
"none"/>
135 <g transform=
"translate(180,230) rotate(45) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
136 <path d=
"M 5 0 L 10 10 L 0 10 Z" fill=
"blue" stroke=
"none"/>
138 <g transform=
"translate(180,280) rotate(90) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill=
"none" stroke=
"black" stroke-width=
"8">
139 <path d=
"M 5 0 L 10 10 L 0 10 Z" fill=
"blue" stroke=
"none"/>
143 <text id=
"revision" x=
"10" y=
"340" font-size=
"40" stroke=
"none" fill=
"black">$Revision:
1.8 $
</text>
144 <rect id=
"test-frame" x=
"1" y=
"1" width=
"478" height=
"358" fill=
"none" stroke=
"#000000"/>