| 1 |
<svg id="svg-root" width="100%" height="100%" |
| 2 |
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 12 |
template-version="1.4" reviewer="AG" author="ED" status="accepted" |
| 13 |
version="$Revision: 1.9 $" testname="$RCSfile: painting-marker-06-f.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/painting.html#MarkerElement"> |
| 15 |
<p> |
| 16 |
Tests the basic support for markers. For the three tests, there |
| 17 |
should be two identical paths with markers drawn. The path on the left is |
| 18 |
rendered using the marker elements. The path on the right is rendered using |
| 19 |
the equivalent SVG, showing what the marked path should look like. |
| 20 |
</p> |
| 21 |
<p> |
| 22 |
This test is similar to the painting-marker-01-f.svg test, but has some viewBox attributes |
| 23 |
that have a non-zero offset. |
| 24 |
</p> |
| 25 |
<p> |
| 26 |
The top test examines the basic support for the marker element and style. The markers are purple rectangles. |
| 27 |
</p> |
| 28 |
<p> |
| 29 |
The middle test examines the support for the different styles of marker properties. The |
| 30 |
"marker-start" property defines the marker to use at the first vertex of the marked path, |
| 31 |
in this case a purple rectangle. The "marker-end" property defines the marker to use at the |
| 32 |
last vertex of the marked path, in this case a blue triangle. The "marker-mid" property |
| 33 |
defines the marker to use at all vertices, other than the first and last, of the marked path, |
| 34 |
in this case a green circle. |
| 35 |
</p> |
| 36 |
<p> |
| 37 |
The bottom test examines the support for marker orientation along the |
| 38 |
path direction. The second vertex, the top right corner of the path, has a marker that |
| 39 |
is rotated 45 degrees, since that is the average of the horizontal and vertical segments |
| 40 |
each side. The last vertex, the bottom right corner of the path, has a marker rotated 90 |
| 41 |
degrees since that is the direction of the last path segment. |
| 42 |
</p> |
| 43 |
</d:testDescription> |
| 44 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 45 |
<p> |
| 46 |
Run the test. No interaction required. |
| 47 |
</p> |
| 48 |
</d:operatorScript> |
| 49 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 50 |
<p> |
| 51 |
The rendered picture should match the reference image, except for possible |
| 52 |
variations in the labelling text (per CSS2 rules). |
| 53 |
</p> |
| 54 |
</d:passCriteria> |
| 55 |
</d:SVGTestCase> |
| 56 |
<title id="test-title">$RCSfile: painting-marker-06-f.svg,v $</title> |
| 57 |
<defs> |
| 58 |
<font-face |
| 59 |
font-family="SVGFreeSansASCII" |
| 60 |
unicode-range="U+0-7F"> |
| 61 |
<font-face-src> |
| 62 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 63 |
</font-face-src> |
| 64 |
</font-face> |
| 65 |
</defs> |
| 66 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 67 |
<defs> |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
<marker id="marker1" viewBox="20 20 10 10" markerWidth="2" markerHeight="2" refX="25" refY="25" markerUnits="strokeWidth"> |
| 72 |
<rect x="20" y="20" width="10" height="10" fill="purple" stroke="none"/> |
| 73 |
</marker> |
| 74 |
<marker id="marker2" viewBox="-5 -5 10 10" markerWidth="2" markerHeight="2" markerUnits="strokeWidth" orient="auto"> |
| 75 |
<path d="M 0 -5 L 5 5 L -5 5 Z" fill="blue" stroke="none"/> |
| 76 |
</marker> |
| 77 |
<marker id="markerStart" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth"> |
| 78 |
<rect width="10" height="10" fill="purple" stroke="none"/> |
| 79 |
</marker> |
| 80 |
<marker id="markerMiddle" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth"> |
| 81 |
<circle cx="5" cy="5" r="5" fill="green" stroke="none"/> |
| 82 |
</marker> |
| 83 |
<marker id="markerEnd" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth"> |
| 84 |
<path d="M 5 0 L 10 10 L 0 10 Z" fill="blue" stroke="none"/> |
| 85 |
</marker> |
| 86 |
</defs> |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
<text x="170" y="30" font-size="14">Basic Markers</text> |
| 91 |
<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"/> |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
<g transform="translate(120,0)"> |
| 96 |
<path fill="none" stroke="black" stroke-width="8" d="M 130 40 L 180 40 L 180 90"/> |
| 97 |
<g transform="translate(130,40) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 98 |
<rect width="10" height="10" fill="purple" stroke="none"/> |
| 99 |
</g> |
| 100 |
<g transform="translate(180,40) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 101 |
<rect width="10" height="10" fill="purple" stroke="none"/> |
| 102 |
</g> |
| 103 |
<g transform="translate(180,90) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 104 |
<rect width="10" height="10" fill="purple" stroke="none"/> |
| 105 |
</g> |
| 106 |
</g> |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
<text x="145" y="125" font-size="14">Start, Middle and End</text> |
| 111 |
<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"/> |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
<g transform="translate(120,0)"> |
| 116 |
<path fill="none" stroke="black" stroke-width="8" d="M 130 135 L 180 135 L 180 185"/> |
| 117 |
<g transform="translate(130,135) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 118 |
<rect width="10" height="10" fill="purple" stroke="none"/> |
| 119 |
</g> |
| 120 |
<g transform="translate(180,135) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 121 |
<circle cx="5" cy="5" r="5" fill="green" stroke="none"/> |
| 122 |
</g> |
| 123 |
<g transform="translate(180,185) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 124 |
<path d="M 5 0 L 10 10 L 0 10 Z" fill="blue" stroke="none"/> |
| 125 |
</g> |
| 126 |
</g> |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
<text x="145" y="220" font-size="14">Automatic Orientation</text> |
| 131 |
<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"/> |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
<g transform="translate(120,0)"> |
| 136 |
<path fill="none" stroke="black" stroke-width="8" d="M 130 230 L 180 230 L 180 280"/> |
| 137 |
<g transform="translate(130,230) rotate(0) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 138 |
<path d="M 5 0 L 10 10 L 0 10 Z" fill="blue" stroke="none"/> |
| 139 |
</g> |
| 140 |
<g transform="translate(180,230) rotate(45) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 141 |
<path d="M 5 0 L 10 10 L 0 10 Z" fill="blue" stroke="none"/> |
| 142 |
</g> |
| 143 |
<g transform="translate(180,280) rotate(90) scale(8) scale(0.2, 0.2) translate(-5, -5)" fill="none" stroke="black" stroke-width="8"> |
| 144 |
<path d="M 5 0 L 10 10 L 0 10 Z" fill="blue" stroke="none"/> |
| 145 |
</g> |
| 146 |
</g> |
| 147 |
</g> |
| 148 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 149 |
<text id="revision" x="10" y="340" stroke="none" |
| 150 |
fill="black">$Revision: 1.9 $</text> |
| 151 |
</g> |
| 152 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
</svg> |