| 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 shows the various shapes that can have markers. --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ========================================================================= --> |
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<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"> |
| 32 |
<title>Marker Test</title> |
| 33 |
|
| 34 |
<g id="content"> |
| 35 |
|
| 36 |
<text class="title" x="50%" y="40">Markers, Shape Test</text> |
| 37 |
|
| 38 |
<defs> |
| 39 |
<radialGradient id="whiteSphere" gradientUnits="objectBoundingBox" cx=".25" cy=".25" r=".8"> |
| 40 |
<stop offset="0" stop-color="white" /> |
| 41 |
<stop offset=".5" stop-color="rgb(230, 230, 230)" /> |
| 42 |
<stop offset=".8" stop-color="rgb(128, 128, 128)" /> |
| 43 |
<stop offset="1.4" stop-color="black" /> |
| 44 |
</radialGradient> |
| 45 |
|
| 46 |
<radialGradient id="graySphere" gradientUnits="objectBoundingBox" cx=".25" cy=".25" r=".8"> |
| 47 |
<stop offset="0" stop-color="white" /> |
| 48 |
<stop offset=".8" stop-color="rgb(40, 40, 40)" /> |
| 49 |
<stop offset="1.4" stop-color="black" /> |
| 50 |
</radialGradient> |
| 51 |
|
| 52 |
<radialGradient id="blackSphere" gradientUnits="objectBoundingBox" cx=".25" cy=".25" r=".8"> |
| 53 |
<stop offset="0" stop-color="white" /> |
| 54 |
<stop offset=".2" stop-color="rgb(40, 40, 40)" /> |
| 55 |
<stop offset="1.4" stop-color="black" /> |
| 56 |
</radialGradient> |
| 57 |
|
| 58 |
<filter id="shadow" x="-1" y="-.2" width="2.8" height="1.4" |
| 59 |
primitiveUnits="objectBoundingBox"> |
| 60 |
<feGaussianBlur stdDeviation="1 1" in="SourceAlpha"/> |
| 61 |
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 .5 0" /> |
| 62 |
<feOffset dx="2" dy="2" result="offset"/> |
| 63 |
<feMerge> |
| 64 |
<feMergeNode in="offset" /> |
| 65 |
<feMergeNode in="SourceGraphic" /> |
| 66 |
</feMerge> |
| 67 |
</filter> |
| 68 |
|
| 69 |
<!-- ============================= --> |
| 70 |
<!-- Simple Marker Definition --> |
| 71 |
<!-- ============================= --> |
| 72 |
<marker id="startMarker" markerWidth="4" markerHeight="4" |
| 73 |
viewBox="0 0 100 100" orient="0" refX="50" refY="50" |
| 74 |
markerUnits="strokeWidth"> |
| 75 |
<circle cx="50" cy="50" r="50" fill="url(#whiteSphere)" stroke="none"/> |
| 76 |
</marker> |
| 77 |
|
| 78 |
<marker id="midMarker" markerWidth="4" markerHeight="4" |
| 79 |
viewBox="0 0 100 100" orient="0" refX="50" refY="50" |
| 80 |
markerUnits="strokeWidth"> |
| 81 |
<circle cx="50" cy="50" r="50" fill="url(#graySphere)" stroke="none"/> |
| 82 |
</marker> |
| 83 |
|
| 84 |
<marker id="endMarker" markerWidth="4" markerHeight="4" |
| 85 |
viewBox="0 0 100 100" orient="0" refX="50" refY="50" |
| 86 |
markerUnits="strokeWidth"> |
| 87 |
<circle cx="50" cy="50" r="50" fill="url(#blackSphere)" stroke="none"/> |
| 88 |
</marker> |
| 89 |
|
| 90 |
</defs> |
| 91 |
|
| 92 |
<!-- ==================================== --> |
| 93 |
<!-- Path with marker --> |
| 94 |
<!-- ==================================== --> |
| 95 |
<g transform="translate(130, 120)" > |
| 96 |
<path fill="none" stroke="black" stroke-width="2" d="M 0 0 q 10 0 10 10 l -10 10 q 10 0 10 10 |
| 97 |
l -10 10 q 10 0 10 10 l -10 10 q 10 0 10 10 l -10 10" |
| 98 |
marker-start="url(#startMarker)" |
| 99 |
marker-mid="url(#midMarker)" |
| 100 |
marker-end="url(#endMarker)" |
| 101 |
filter="url(#shadow)" |
| 102 |
transform="scale(3, 3)" /> |
| 103 |
<text x="15" y="280" text-anchor="middle" class="label"><path></text> |
| 104 |
</g> |
| 105 |
|
| 106 |
<!-- ==================================== --> |
| 107 |
<!-- Line with marker --> |
| 108 |
<!-- ==================================== --> |
| 109 |
<g transform="translate(50, 120)" filter="url(#shadow)" > |
| 110 |
<rect x="-10" y="-10" width="20" height="260" fill="none" stroke="none"/> |
| 111 |
<line stroke="black" stroke-width="6" x1="0" y1="0" x2="0" y2="240" |
| 112 |
marker-start="url(#startMarker)" |
| 113 |
marker-mid="url(#midMarker)" |
| 114 |
marker-end="url(#endMarker)" |
| 115 |
/> |
| 116 |
<text x="0" y="280" text-anchor="middle" class="label"><line></text> |
| 117 |
</g> |
| 118 |
|
| 119 |
<!-- ==================================== --> |
| 120 |
<!-- Polyline with marker --> |
| 121 |
<!-- ==================================== --> |
| 122 |
<g transform="translate(240, 120)" > |
| 123 |
<polyline fill="none" stroke="black" stroke-width="2" points="0,0 10,10 0,20 10,30 0,40 10,50 0,60 10,70 0,80 " |
| 124 |
marker-start="url(#startMarker)" |
| 125 |
marker-mid="url(#midMarker)" |
| 126 |
marker-end="url(#endMarker)" filter="url(#shadow)" transform="scale(3, 3)" /> |
| 127 |
<text x="0" y="280" text-anchor="middle" class="label"><polyline></text> |
| 128 |
</g> |
| 129 |
|
| 130 |
<!-- ==================================== --> |
| 131 |
<!-- Polygon with marker --> |
| 132 |
<!-- ==================================== --> |
| 133 |
<g transform="translate(380, 120)" > |
| 134 |
<polygon fill="none" stroke="black" stroke-width="2" |
| 135 |
points="0,0 10,10 0,20 10,30 0,40 10,50 0,60 10,70 0,80 |
| 136 |
-20,80 -10,70 -20,60 -10,50 -20,40 -10,30 -20,20 -10,10 -20,0" |
| 137 |
marker-start="url(#startMarker)" |
| 138 |
marker-mid="url(#midMarker)" |
| 139 |
marker-end="url(#endMarker)" filter="url(#shadow)" transform="scale(3, 3)" /> |
| 140 |
<text x="-20" y="280" text-anchor="middle" class="label"><polygon></text> |
| 141 |
</g> |
| 142 |
|
| 143 |
|
| 144 |
</g> |
| 145 |
|
| 146 |
<!-- ============================================================= --> |
| 147 |
<!-- Batik sample mark --> |
| 148 |
<!-- ============================================================= --> |
| 149 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 150 |
|
| 151 |
</svg> |