| 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 handling of the orient property on maker-start and --> |
| 25 |
<!-- marker-end. --> |
| 26 |
<!-- --> |
| 27 |
<!-- @author [email protected] --> |
| 28 |
<!-- @version $Id$ --> |
| 29 |
<!-- ========================================================================= --> |
| 30 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 31 |
|
| 32 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 33 |
<title>Marker Test</title> |
| 34 |
|
| 35 |
<style type="text/css"><![CDATA[ |
| 36 |
.markedPath { fill:none; stroke:black; stroke-width:4; } |
| 37 |
]]></style> |
| 38 |
|
| 39 |
<g id="content"> |
| 40 |
|
| 41 |
<g transform="translate(0, 40)"> |
| 42 |
<text class="title" x="50%" y="0">Markers, Ref Point, Overflow</text> |
| 43 |
<text class="title" x="50%" y="1em">markerUnits & viewBox</text> |
| 44 |
</g> |
| 45 |
|
| 46 |
<defs> |
| 47 |
<g id="crossHair" style="marker:none" stroke="black"> |
| 48 |
<line y1="-5" x2="0" y2="5" /> |
| 49 |
<line x1="-5" x2="5" y2="0" /> |
| 50 |
</g> |
| 51 |
|
| 52 |
<g id="startEndCrossHairs"> |
| 53 |
<use x="0" y="20" xlink:href="#crossHair" /> |
| 54 |
<use x="30" y="0" xlink:href="#crossHair" /> |
| 55 |
</g> |
| 56 |
|
| 57 |
<g id="startMidEndCrossHairs"> |
| 58 |
<use x="0" y="20" xlink:href="#crossHair" /> |
| 59 |
<use x="20" y="0" xlink:href="#crossHair" /> |
| 60 |
<use x="50" y="10" xlink:href="#crossHair" /> |
| 61 |
</g> |
| 62 |
|
| 63 |
<path id="testPath" d="M 0 0 l 60 0 l 60 0" /> |
| 64 |
|
| 65 |
<g id="testPathCrossHairs"> |
| 66 |
<use xlink:href="#crossHair" /> |
| 67 |
<use x="60" xlink:href="#crossHair" /> |
| 68 |
<use x="120" xlink:href="#crossHair" /> |
| 69 |
</g> |
| 70 |
|
| 71 |
<g id="markerContent" fill="none" stroke="none"> |
| 72 |
<circle r="1.8" stroke="black" fill="crimson" stroke-width=".4" /> |
| 73 |
<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" |
| 74 |
fill="yellow" stroke="none" /> |
| 75 |
</g> |
| 76 |
|
| 77 |
<!-- ============================= --> |
| 78 |
<!-- Simple Marker Definition --> |
| 79 |
<!-- ============================= --> |
| 80 |
<marker id="markerTopRef" markerWidth="8" markerHeight="8" |
| 81 |
viewBox="-2 -2 4 4" orient="0" refX="-1" refY="-1" |
| 82 |
markerUnits="strokeWidth" overflow="hidden"> |
| 83 |
<g> |
| 84 |
<use xlink:href="#markerContent" /> |
| 85 |
<circle fill="white" stroke="none" cx="-1" cy="-1" r=".4" /> |
| 86 |
</g> |
| 87 |
</marker> |
| 88 |
|
| 89 |
<marker id="markerCenterRef" markerWidth="8" markerHeight="8" |
| 90 |
viewBox="-2 -2 4 4" orient="0" refX="0" refY="0" |
| 91 |
markerUnits="strokeWidth" overflow="hidden"> |
| 92 |
<g> |
| 93 |
<use xlink:href="#markerContent" /> |
| 94 |
<circle fill="white" stroke="none" cx="0" cy="0" r=".4" /> |
| 95 |
</g> |
| 96 |
</marker> |
| 97 |
|
| 98 |
<marker id="markerBottomRef" markerWidth="8" markerHeight="8" |
| 99 |
viewBox="-2 -2 4 4" orient="0" refX="1" refY="1" |
| 100 |
markerUnits="strokeWidth" overflow="hidden"> |
| 101 |
<g> |
| 102 |
<use xlink:href="#markerContent" /> |
| 103 |
<circle fill="white" stroke="none" cx="1" cy="1" r=".4" /> |
| 104 |
</g> |
| 105 |
</marker> |
| 106 |
|
| 107 |
<marker id="markerHidden" markerWidth="20" markerHeight="20" |
| 108 |
viewBox="-1 -1 2 2" orient="0" refX="0" refY="0" |
| 109 |
markerUnits="strokeWidth" overflow="hidden"> |
| 110 |
<g> |
| 111 |
<use xlink:href="#markerContent" /> |
| 112 |
<rect fill="none" stroke="black" stroke-width="0.1" x="-0.95" y="-0.95" width="1.9" height="1.9" /> |
| 113 |
</g> |
| 114 |
</marker> |
| 115 |
|
| 116 |
<marker id="markerOverflow" markerWidth="20" markerHeight="20" |
| 117 |
viewBox="-1 -1 2 2" orient="0" refX="0" refY="0" |
| 118 |
markerUnits="strokeWidth" overflow="visible"> |
| 119 |
<g> |
| 120 |
<use xlink:href="#markerContent" /> |
| 121 |
<rect fill="none" stroke="white" stroke-width="0.1" x="-1" y="-1" width="2" height="2" /> |
| 122 |
</g> |
| 123 |
</marker> |
| 124 |
|
| 125 |
<marker id="markerViewBoxTopLeft" markerWidth="20" markerHeight="20" |
| 126 |
viewBox="-2 -2 2 2" orient="0" refX="0" refY="0" |
| 127 |
markerUnits="strokeWidth" overflow="hidden"> |
| 128 |
<g> |
| 129 |
<use xlink:href="#markerContent" /> |
| 130 |
<rect x="-1.95" y="-1.95" width="1.9" height="1.9" stroke-width="0.1" stroke="black" fill="none"/> |
| 131 |
</g> |
| 132 |
</marker> |
| 133 |
|
| 134 |
<marker id="markerViewBoxBottomRight" markerWidth="20" markerHeight="20" |
| 135 |
viewBox="0 0 2 2" orient="0" refX="0" refY="0" |
| 136 |
markerUnits="strokeWidth" overflow="hidden"> |
| 137 |
<g> |
| 138 |
<use xlink:href="#markerContent" /> |
| 139 |
<rect x=".05" y=".05" width="1.9" height="1.9" stroke-width="0.1" stroke="black" fill="none"/> |
| 140 |
</g> |
| 141 |
</marker> |
| 142 |
|
| 143 |
<marker id="markerViewBoxCenterSlice" markerWidth="20" markerHeight="40" |
| 144 |
viewBox="-1 -2 2 4" orient="0" refX="0" refY="0" |
| 145 |
markerUnits="strokeWidth" overflow="hidden"> |
| 146 |
<g> |
| 147 |
<use xlink:href="#markerContent" /> |
| 148 |
<rect x="-.95" y="-1.95" width="1.9" height="3.9" stroke-width="0.1" stroke="black" fill="none"/> |
| 149 |
</g> |
| 150 |
</marker> |
| 151 |
|
| 152 |
<marker id="markerStrokeWidth" markerWidth="40" markerHeight="40" |
| 153 |
viewBox="-1 -1 2 2" orient="0" refX="0" refY="0" |
| 154 |
markerUnits="strokeWidth" overflow="visible"> |
| 155 |
<g> |
| 156 |
<use xlink:href="#markerContent" /> |
| 157 |
</g> |
| 158 |
</marker> |
| 159 |
|
| 160 |
<marker id="markerUserSpace" markerWidth="20" markerHeight="20" |
| 161 |
viewBox="-1 -1 2 2" orient="0" refX="0" refY="0" |
| 162 |
markerUnits="userSpaceOnUse" overflow="visible"> |
| 163 |
<g> |
| 164 |
<use xlink:href="#markerContent" /> |
| 165 |
</g> |
| 166 |
</marker> |
| 167 |
|
| 168 |
|
| 169 |
</defs> |
| 170 |
|
| 171 |
<g transform="translate(50, 140)"> |
| 172 |
|
| 173 |
<!-- ==================================== --> |
| 174 |
<!-- Simply test the various settings for --> |
| 175 |
<!-- the refX and refY attributes --> |
| 176 |
<!-- ==================================== --> |
| 177 |
<g transform="translate(0, 0)" > |
| 178 |
<!-- Top reference point --> |
| 179 |
<use xlink:href="#testPath" |
| 180 |
marker-start="url(#markerBottomRef)" |
| 181 |
marker-mid="url(#markerCenterRef)" |
| 182 |
marker-end="url(#markerTopRef)" |
| 183 |
class="markedPath"/> |
| 184 |
<use xlink:href="#testPathCrossHairs" /> |
| 185 |
|
| 186 |
<g class="label" transform="translate(60, 50)" text-anchor="middle"> |
| 187 |
<text y="0">Various values for refX/refY </text> |
| 188 |
<text y="14">start, middle and end</text> |
| 189 |
</g> |
| 190 |
</g> |
| 191 |
|
| 192 |
<!-- ==================================== --> |
| 193 |
<!-- Test the various settings for the --> |
| 194 |
<!-- overflow property --> |
| 195 |
<!-- ==================================== --> |
| 196 |
<g transform="translate(0, 140)" > |
| 197 |
<!-- Top reference point --> |
| 198 |
<use xlink:href="#testPath" |
| 199 |
style="marker:url(#markerHidden); stroke-width:1; stroke:crimson"/> |
| 200 |
<use xlink:href="#testPathCrossHairs" /> |
| 201 |
|
| 202 |
<use y="70" xlink:href="#testPath" |
| 203 |
style="marker:url(#markerOverflow);stroke-width:1; stroke:crimson"/> |
| 204 |
<use y="70" xlink:href="#testPathCrossHairs" /> |
| 205 |
|
| 206 |
<g class="label" transform="translate(60, 90)" text-anchor="middle"> |
| 207 |
<text y="-110">overflow="hidden"</text> |
| 208 |
<text y="-50">overflow="visible"</text> |
| 209 |
<text y="30">Various values for the </text> |
| 210 |
<text y="44">overflow property</text> |
| 211 |
</g> |
| 212 |
</g> |
| 213 |
|
| 214 |
<!-- ==================================== --> |
| 215 |
<!-- Test the various settings for the --> |
| 216 |
<!-- viewBox property --> |
| 217 |
<!-- ==================================== --> |
| 218 |
<g transform="translate(225, 0)" > |
| 219 |
<!-- Top reference point --> |
| 220 |
<use xlink:href="#testPath" |
| 221 |
marker-start="url(#markerViewBoxTopLeft)" |
| 222 |
marker-end="url(#markerViewBoxBottomRight)" |
| 223 |
marker-mid="url(#markerViewBoxCenterSlice)" |
| 224 |
style="stroke-width:1; stroke:crimson"/> |
| 225 |
<use xlink:href="#testPathCrossHairs" /> |
| 226 |
|
| 227 |
<g class="label" transform="translate(60, 50)" text-anchor="middle"> |
| 228 |
<text y="0">Various values for the </text> |
| 229 |
<text y="14">viewBox property</text> |
| 230 |
</g> |
| 231 |
</g> |
| 232 |
|
| 233 |
<!-- ==================================== --> |
| 234 |
<!-- Test the various settings for the --> |
| 235 |
<!-- markerUnits property --> |
| 236 |
<!-- ==================================== --> |
| 237 |
<g transform="translate(225, 140)" > |
| 238 |
<!-- Top reference point --> |
| 239 |
<use xlink:href="#testPath" |
| 240 |
style="marker:url(#markerStrokeWidth);stroke-width:.5; stroke:crimson"/> |
| 241 |
<use xlink:href="#testPathCrossHairs" /> |
| 242 |
|
| 243 |
<use y="70" xlink:href="#testPath" |
| 244 |
style="marker:url(#markerUserSpace); stroke-width:.5; stroke:crimson"/> |
| 245 |
<use y="70" xlink:href="#testPathCrossHairs" /> |
| 246 |
|
| 247 |
<g class="label" transform="translate(60, 90)" text-anchor="middle"> |
| 248 |
<text y="-115">markerUnits="strokeWidth"</text> |
| 249 |
<text y="-45">markerUnits="userSpaceOnUse"</text> |
| 250 |
<text y="30">Various values for the </text> |
| 251 |
<text y="44">markerUnits property</text> |
| 252 |
</g> |
| 253 |
</g> |
| 254 |
|
| 255 |
|
| 256 |
</g> |
| 257 |
</g> |
| 258 |
|
| 259 |
<!-- ============================================================= --> |
| 260 |
<!-- Batik sample mark --> |
| 261 |
<!-- ============================================================= --> |
| 262 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 263 |
|
| 264 |
</svg> |