| 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 |
<!-- Test use and styling --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ========================================================================= --> |
| 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" width="450" height="500" viewBox="0 0 450 500"> |
| 33 |
<title>Test use and styling using URIs</title> |
| 34 |
|
| 35 |
<!-- ============================================================= --> |
| 36 |
<!-- Test content --> |
| 37 |
<!-- ============================================================= --> |
| 38 |
<g id="testContent" transform="translate(0 -40)"> |
| 39 |
<text x="225" y="60" class="title"><use> and styling using URIs</text> |
| 40 |
<text x="225" y="80" style="text-anchor:middle; font-size:12; font-style:italic">This file is using the defs.svg file to get the external resources</text> |
| 41 |
|
| 42 |
<g font-size="10"> |
| 43 |
<text x="20" y="496">- linearGradient defined in this file (local)</text> |
| 44 |
<text x="20" y="508">- radialGradient defined in defs.svg (external)</text> |
| 45 |
<text x="20" y="520">- gold/crimson: gradient on <rect>, white/black: gradient on <use></text> |
| 46 |
<text x="26" y="532">yellow/green: inherited from <g></text> |
| 47 |
</g> |
| 48 |
|
| 49 |
<!-- ############################### --> |
| 50 |
<g id="board" style="fill:none; stroke:black;"> |
| 51 |
|
| 52 |
<g style="fill:#eee"> |
| 53 |
<rect x="75" y="100" width="150" height="20" /> |
| 54 |
<rect x="225" y="100" width="150" height="20" /> |
| 55 |
|
| 56 |
<rect x="35" y="120" width="20" height="120" /> |
| 57 |
<rect x="35" y="240" width="20" height="120" /> |
| 58 |
<rect x="35" y="360" width="20" height="120" /> |
| 59 |
|
| 60 |
</g> |
| 61 |
|
| 62 |
<g style="fill:#ccc"> |
| 63 |
<rect x="55" y="120" width="20" height="60" /> |
| 64 |
<rect x="55" y="180" width="20" height="60" /> |
| 65 |
<rect x="55" y="240" width="20" height="60" /> |
| 66 |
<rect x="55" y="300" width="20" height="60" /> |
| 67 |
<rect x="55" y="360" width="20" height="60" /> |
| 68 |
<rect x="55" y="420" width="20" height="60" /> |
| 69 |
</g> |
| 70 |
|
| 71 |
<rect x="75" y="120" width="150" height="360" /> |
| 72 |
<rect x="225" y="120" width="150" height="360" /> |
| 73 |
|
| 74 |
<line x1="75" y1="180" x2="375" y2="180" /> |
| 75 |
<line x1="75" y1="240" x2="375" y2="240" /> |
| 76 |
<line x1="75" y1="300" x2="375" y2="300" /> |
| 77 |
<line x1="75" y1="360" x2="375" y2="360" /> |
| 78 |
<line x1="75" y1="420" x2="375" y2="420" /> |
| 79 |
<line x1="75" y1="480" x2="375" y2="480" /> |
| 80 |
|
| 81 |
<g style="font-size:12; text-anchor:middle; fill:black; stroke:none"> |
| 82 |
<text x="150" y="114">Local <use></text> |
| 83 |
<text x="300" y="114">External <use></text> |
| 84 |
|
| 85 |
<text x="0" y="0" transform="translate(50 180) rotate(-90)">internal style on</text> |
| 86 |
<text x="0" y="0" transform="translate(50 300) rotate(-90)">external style on</text> |
| 87 |
<text x="0" y="0" transform="translate(50 420) rotate(-90)">inherited style</text> |
| 88 |
|
| 89 |
<text x="0" y="0" transform="translate(70 150) rotate(-90)"><rect></text> |
| 90 |
<text x="0" y="0" transform="translate(70 210) rotate(-90)"><use></text> |
| 91 |
<text x="0" y="0" transform="translate(70 270) rotate(-90)"><rect></text> |
| 92 |
<text x="0" y="0" transform="translate(70 330) rotate(-90)"><use></text> |
| 93 |
<text x="0" y="0" transform="translate(70 390) rotate(-90)">internal</text> |
| 94 |
<text x="0" y="0" transform="translate(70 450) rotate(-90)">external</text> |
| 95 |
</g> |
| 96 |
</g> |
| 97 |
|
| 98 |
|
| 99 |
<!-- ############################### --> |
| 100 |
<defs> |
| 101 |
|
| 102 |
<linearGradient id="grad1"> |
| 103 |
<stop style="stop-color:gold" offset="0" /> |
| 104 |
<stop style="stop-color:crimson" offset="1" /> |
| 105 |
</linearGradient> |
| 106 |
|
| 107 |
<linearGradient id="grad2"> |
| 108 |
<stop style="stop-color:white" offset="0" /> |
| 109 |
<stop style="stop-color:black" offset="1" /> |
| 110 |
</linearGradient> |
| 111 |
|
| 112 |
<linearGradient id="grad3"> |
| 113 |
<stop style="stop-color:gold" offset="0" /> |
| 114 |
<stop style="stop-color:green" offset="1" /> |
| 115 |
</linearGradient> |
| 116 |
|
| 117 |
<g style="fill:black;"> <!-- ### NOTHING SHOULD BE BLACK ON THE SCREEN ### --> |
| 118 |
<circle id="e" cx="25" cy="25" r="20" /> |
| 119 |
<circle id="e1" cx="25" cy="25" r="20" style="fill:url(#grad1)" /> |
| 120 |
<circle id="e3" cx="25" cy="25" r="20" style="fill:url(../../resources/svg/defs.svg#extGrad1)" /> |
| 121 |
</g> |
| 122 |
|
| 123 |
</defs> |
| 124 |
|
| 125 |
<!-- ############################### --> |
| 126 |
<!-- LOCAL USE --> |
| 127 |
<!-- ############################### --> |
| 128 |
<g> |
| 129 |
|
| 130 |
<!-- fill: internal URI on the referenced element --> |
| 131 |
<use xlink:href="#e1" x="125" y="125" /> |
| 132 |
|
| 133 |
<!-- fill:internal URI on the use --> |
| 134 |
<use xlink:href="#e" x="125" y="185" style="fill:url(#grad2)"/> |
| 135 |
|
| 136 |
<!-- fill: external URI on the referenced element --> |
| 137 |
<use xlink:href="#e3" x="125" y="245" /> |
| 138 |
|
| 139 |
<!-- fill: external URI on the use --> |
| 140 |
<use xlink:href="#e" x="125" y="305" style="fill:url(../../resources/svg/defs.svg#extGrad2)" /> |
| 141 |
|
| 142 |
<g style="fill:url(#grad3)"> |
| 143 |
<!-- fill: inherited local URI --> |
| 144 |
<use xlink:href="#e" x="125" y="365" /> |
| 145 |
</g> |
| 146 |
|
| 147 |
<g style="fill:url(../../resources/svg/defs.svg#extGrad3)"> |
| 148 |
<!-- fill: inherited external URI --> |
| 149 |
<use xlink:href="#e" x="125" y="425" /> |
| 150 |
</g> |
| 151 |
</g> |
| 152 |
|
| 153 |
|
| 154 |
<!-- ############################### --> |
| 155 |
<!-- EXTERNAL USE --> |
| 156 |
<!-- ############################### --> |
| 157 |
<g> |
| 158 |
|
| 159 |
<!-- fill: internal URI on the referenced element --> |
| 160 |
<use xlink:href="../../resources/svg/defs.svg#extE1" x="275" y="125" /> |
| 161 |
|
| 162 |
<!-- fill:internal URI on the use --> |
| 163 |
<use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="185" style="fill:url(#grad2)"/> |
| 164 |
|
| 165 |
<!-- fill: external URI on the referenced element --> |
| 166 |
<use xlink:href="../../resources/svg/defs.svg#extE2" x="275" y="245" /> |
| 167 |
|
| 168 |
<!-- fill: external URI on the use --> |
| 169 |
<use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="305" style="fill:url(../../resources/svg/defs.svg#extGrad2)"/> |
| 170 |
|
| 171 |
<!-- fill: inherited local URI --> |
| 172 |
<g style="fill:url(#grad3)"> |
| 173 |
<use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="365" /> |
| 174 |
</g> |
| 175 |
|
| 176 |
<!-- fill: inherited external URI --> |
| 177 |
<g style="fill:url(../../resources/svg/defs.svg#extGrad3)"> |
| 178 |
<use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="425" /> |
| 179 |
</g> |
| 180 |
|
| 181 |
</g> |
| 182 |
|
| 183 |
</g> |
| 184 |
|
| 185 |
<!-- ============================================================= --> |
| 186 |
<!-- Batik sample mark --> |
| 187 |
<!-- ============================================================= --> |
| 188 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 189 |
</svg> |