| 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 |
<!-- --> |
| 25 |
<!-- @author [email protected] --> |
| 26 |
<!-- @version $Id$ --> |
| 27 |
<!-- ========================================================================= --> |
| 28 |
|
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<svg id="body" width="450" height="500" viewBox="0 0 450 500" |
| 32 |
xmlns="http://www.w3.org/2000/svg" version="1.2" |
| 33 |
xmlns:xlink="http://www.w3.org/1999/xlink" > |
| 34 |
<title>FilterRegions test</title> |
| 35 |
|
| 36 |
<text x="225" y="40" class="title"> |
| 37 |
Filter Regions with padding |
| 38 |
</text> |
| 39 |
|
| 40 |
<style type="text/css"> |
| 41 |
<![CDATA[ |
| 42 |
.filterRegionControl { |
| 43 |
fill: none; |
| 44 |
stroke: black; |
| 45 |
stroke-opacity: 1; |
| 46 |
stroke-width: 1; |
| 47 |
shape-rendering: crispEdges; |
| 48 |
} |
| 49 |
|
| 50 |
.bbox { |
| 51 |
fill: none; |
| 52 |
stroke: black; |
| 53 |
stroke-opacity: 1; |
| 54 |
stroke-width: 1; |
| 55 |
shape-rendering: crispEdges; |
| 56 |
stroke-dasharray: 3 3; |
| 57 |
} |
| 58 |
|
| 59 |
.filterRegionControlLabel { |
| 60 |
fill: black; |
| 61 |
font-size: 10; |
| 62 |
text-anchor: middle; |
| 63 |
shape-rendering: crispEdges; |
| 64 |
} |
| 65 |
]]> |
| 66 |
</style> |
| 67 |
|
| 68 |
<defs> |
| 69 |
<!-- ======================================================== --> |
| 70 |
<!-- filterRegion_0 --> |
| 71 |
<!-- chain padding: [userSpaceOnUse], undefined --> |
| 72 |
<!-- flood padding: [userSpaceOnUse], undefined --> |
| 73 |
<!-- --> |
| 74 |
<!-- Expected fill region: (0, 0, 60, 40) in user space --> |
| 75 |
<!-- ======================================================== --> |
| 76 |
<filter id="filterRegion_0" x="0" y="0" width="1" height="1"> |
| 77 |
<feFlood flood-color="crimson" |
| 78 |
result="crimson"/> |
| 79 |
</filter> |
| 80 |
|
| 81 |
<!-- ======================================================== --> |
| 82 |
<!-- filterRegion_1 --> |
| 83 |
<!-- chain padding: [userSpaceOnUse], -5,-5,10,10 --> |
| 84 |
<!-- flood padding: [userSpaceOnUse], undefined --> |
| 85 |
<!-- --> |
| 86 |
<!-- Expected fill region: (-5, -5, 70, 50) in user space --> |
| 87 |
<!-- ======================================================== --> |
| 88 |
<filter id="filterRegion_1" x="0" y="0" width="1" height="1" |
| 89 |
mx="-5" my="-5" mw="10" mh="10"> |
| 90 |
<feFlood flood-color="gold" |
| 91 |
result="gold"/> |
| 92 |
</filter> |
| 93 |
|
| 94 |
<!-- ======================================================== --> |
| 95 |
<!-- filterRegion_2 --> |
| 96 |
<!-- chain padding: [userSpaceOnUse], 5,5,-10,-10 --> |
| 97 |
<!-- flood padding: [userSpaceOnUse], undefined --> |
| 98 |
<!-- --> |
| 99 |
<!-- Expected fill region: (5, 5, 50, 30) in user space --> |
| 100 |
<!-- ======================================================== --> |
| 101 |
<filter id="filterRegion_2" x="0" y="0" width="1" height="1" |
| 102 |
mx="5" my="5" mw="-10" mh="-10"> |
| 103 |
<feFlood flood-color="orange" |
| 104 |
result="orange"/> |
| 105 |
</filter> |
| 106 |
|
| 107 |
<!-- ======================================================== --> |
| 108 |
<!-- filterRegion_3 --> |
| 109 |
<!-- chain padding: [userSpaceOnUse], -5,-5,10,10 --> |
| 110 |
<!-- flood padding: [userSpaceOnUse], undefined --> |
| 111 |
<!-- --> |
| 112 |
<!-- Expected fill region: (-5, -5, 70, 50) in user space --> |
| 113 |
<!-- ======================================================== --> |
| 114 |
<filter id="filterRegion_3" x="0" y="0" width="1" height="1" |
| 115 |
filterMarginsUnits="userSpaceOnUse" |
| 116 |
mx="-5" my="-5" mw="10" mh="10"> |
| 117 |
<feFlood flood-color="gold" /> |
| 118 |
</filter> |
| 119 |
|
| 120 |
<!-- ======================================================== --> |
| 121 |
<!-- filterRegion_4 --> |
| 122 |
<!-- chain padding: [userSpaceOnUse], 5, 5, -10, -10 --> |
| 123 |
<!-- flood padding: [userSpaceOnUse], undefined --> |
| 124 |
<!-- --> |
| 125 |
<!-- Expected fill region: (5, 5, 50, 30) in user space --> |
| 126 |
<!-- ======================================================== --> |
| 127 |
<filter id="filterRegion_4" x="0" y="0" width="1" height="1" |
| 128 |
filterMarginsUnits="userSpaceOnUse" |
| 129 |
mx="5" my="5" mw="-10" mh="-10"> |
| 130 |
<feFlood flood-color="orange" /> |
| 131 |
</filter> |
| 132 |
|
| 133 |
<!-- ======================================================== --> |
| 134 |
<!-- filterRegion_5 --> |
| 135 |
<!-- chain padding: [objectBoundingBox], -.1, -.1, .2, .2 --> |
| 136 |
<!-- flood padding: [userSpaceOnUse], undefined --> |
| 137 |
<!-- --> |
| 138 |
<!-- Expected fill region: (-6, -4, 72, 48) in user space --> |
| 139 |
<!-- ======================================================== --> |
| 140 |
<filter id="filterRegion_5" x="0" y="0" width="1" height="1" |
| 141 |
filterMarginsUnits="objectBoundingBox" |
| 142 |
mx="-.1" my="-.1" mw=".2" mh=".2"> |
| 143 |
<feFlood flood-color="gold" /> |
| 144 |
</filter> |
| 145 |
|
| 146 |
<!-- ======================================================== --> |
| 147 |
<!-- filterRegion_6 --> |
| 148 |
<!-- chain padding: [objectBoundingBox], .1, .1, -.2, -.2 --> |
| 149 |
<!-- flood padding: [userSpaceOnUse], undefined --> |
| 150 |
<!-- --> |
| 151 |
<!-- Expected fill region: (6, 4, 48, 32) in user space --> |
| 152 |
<!-- ======================================================== --> |
| 153 |
<filter id="filterRegion_6" x="0" y="0" width="1" height="1" |
| 154 |
filterMarginsUnits="objectBoundingBox" |
| 155 |
mx=".1" my=".1" mw="-.2" mh="-.2"> |
| 156 |
<feFlood flood-color="orange" /> |
| 157 |
</filter> |
| 158 |
|
| 159 |
<!-- ======================================================== --> |
| 160 |
<!-- filterRegion_7 --> |
| 161 |
<!-- chain padding: [userSpaceOnUse], undefined --> |
| 162 |
<!-- flood padding: [default], 5, 5, -10, -10 --> |
| 163 |
<!-- --> |
| 164 |
<!-- Expected fill region: (5, 5, 50, 30) in user space --> |
| 165 |
<!-- ======================================================== --> |
| 166 |
<filter id="filterRegion_7" x="0" y="0" width="1" height="1"> |
| 167 |
<feFlood flood-color="crimson" result="crimson"/> |
| 168 |
<feFlood flood-color="gold" |
| 169 |
result="gold" mx="5" my="5" mw="-10" mh="-10"/> |
| 170 |
<feMerge> |
| 171 |
<feMergeNode in="crimson" /> |
| 172 |
<feMergeNode in="gold" /> |
| 173 |
</feMerge> |
| 174 |
</filter> |
| 175 |
|
| 176 |
<!-- ======================================================== --> |
| 177 |
<!-- filterRegion_8 --> |
| 178 |
<!-- chain padding: [userSpaceOnUse], undefined --> |
| 179 |
<!-- flood padding: [userSpaceOnUse], 5, 5, -10, -10 --> |
| 180 |
<!-- --> |
| 181 |
<!-- Expected fill region: (5, 5, 50, 30) in user space --> |
| 182 |
<!-- ======================================================== --> |
| 183 |
<filter id="filterRegion_8" x="0" y="0" width="1" height="1" |
| 184 |
filterPrimitiveMarginsUnits="userSpaceOnUse"> |
| 185 |
<feFlood flood-color="gold" result="gold"/> |
| 186 |
<feFlood flood-color="crimson" |
| 187 |
result="crimson" mx="5" my="5" mw="-10" mh="-10"/> |
| 188 |
<feMerge> |
| 189 |
<feMergeNode in="gold" /> |
| 190 |
<feMergeNode in="crimson" /> |
| 191 |
</feMerge> |
| 192 |
</filter> |
| 193 |
|
| 194 |
<!-- ======================================================== --> |
| 195 |
<!-- filterRegion_9 --> |
| 196 |
<!-- chain padding: [userSpaceOnUse], undefined --> |
| 197 |
<!-- flood padding: [objectBoundingBox], .1, .1, -.2, -.2 --> |
| 198 |
<!-- --> |
| 199 |
<!-- Expected fill region: (6, 4, 48, 32) in user space --> |
| 200 |
<!-- ======================================================== --> |
| 201 |
<filter id="filterRegion_9" x="0" y="0" width="1" height="1" |
| 202 |
filterPrimitiveMarginsUnits="objectBoundingBox"> |
| 203 |
<feFlood flood-color="gold" result="gold"/> |
| 204 |
<feFlood flood-color="crimson" |
| 205 |
result="crimson" mx=".1" my=".1" mw="-.2" mh="-.2"/> |
| 206 |
<feMerge> |
| 207 |
<feMergeNode in="gold" /> |
| 208 |
<feMergeNode in="crimson" /> |
| 209 |
</feMerge> |
| 210 |
</filter> |
| 211 |
|
| 212 |
|
| 213 |
</defs> |
| 214 |
|
| 215 |
<!-- ============================ --> |
| 216 |
<!-- filterRegion_0 : No padding --> |
| 217 |
<!-- ============================ --> |
| 218 |
<g transform="translate(20, 100)"> |
| 219 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_0)" /> |
| 220 |
<rect class="filterRegionControl" x="0" y="0" width="60" height="40" /> |
| 221 |
<text x="30" y="-10" class="filterRegionControlLabel">No padding</text> |
| 222 |
</g> |
| 223 |
|
| 224 |
<!-- ========================================== --> |
| 225 |
<!-- filterRegion_1 : User Space chain padding --> |
| 226 |
<!-- ========================================== --> |
| 227 |
<g transform="translate(120, 100)"> |
| 228 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_1)" /> |
| 229 |
<rect class="filterRegionControl" x="-5" y="-5" width="70" height="50" /> |
| 230 |
<rect class="bbox" x="0" y="0" width="60" height="40" /> |
| 231 |
<text x="30" y="-10" class="filterRegionControlLabel">Chain Padding A</text> |
| 232 |
</g> |
| 233 |
|
| 234 |
<!-- ============================================== --> |
| 235 |
<!-- filterRegion_2 : User Space chain padding --> |
| 236 |
<!-- ============================================== --> |
| 237 |
<g transform="translate(220, 100)"> |
| 238 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_2)" /> |
| 239 |
<rect class="filterRegionControl" x="5" y="5" width="50" height="30" /> |
| 240 |
<rect class="bbox" width="60" height="40" /> |
| 241 |
<text x="30" y="-10" class="filterRegionControlLabel">Chain Padding B</text> |
| 242 |
</g> |
| 243 |
|
| 244 |
<!-- ========================================== --> |
| 245 |
<!-- filterRegion_3 : User Space chain padding --> |
| 246 |
<!-- ========================================== --> |
| 247 |
<g transform="translate(120, 200)"> |
| 248 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_3)" /> |
| 249 |
<rect class="filterRegionControl" x="-5" y="-5" width="70" height="50" /> |
| 250 |
<rect class="bbox" width="60" height="40" /> |
| 251 |
<text x="30" y="-10" class="filterRegionControlLabel">Chain Padding C</text> |
| 252 |
</g> |
| 253 |
|
| 254 |
<!-- ============================================== --> |
| 255 |
<!-- filterRegion_4 : Use Space chain padding --> |
| 256 |
<!-- ============================================== --> |
| 257 |
<g transform="translate(220, 200)"> |
| 258 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_4)" /> |
| 259 |
<rect class="filterRegionControl" x="5" y="5" width="50" height="30" /> |
| 260 |
<rect class="bbox" width="60" height="40" /> |
| 261 |
<text x="30" y="-10" class="filterRegionControlLabel">Chain Padding D</text> |
| 262 |
</g> |
| 263 |
|
| 264 |
<!-- ========================================== --> |
| 265 |
<!-- filterRegion_5 : object BB chain padding --> |
| 266 |
<!-- ========================================== --> |
| 267 |
<g transform="translate(120, 300)"> |
| 268 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_5)" /> |
| 269 |
<rect class="bbox" width="60" height="40" /> |
| 270 |
<rect class="filterRegionControl" x="-6" y="-4" width="72" height="48" /> |
| 271 |
<text x="30" y="-10" class="filterRegionControlLabel">Chain Padding E</text> |
| 272 |
</g> |
| 273 |
|
| 274 |
<!-- ============================================== --> |
| 275 |
<!-- filterRegion_6 : object BB chain padding --> |
| 276 |
<!-- ============================================== --> |
| 277 |
<g transform="translate(220, 300)"> |
| 278 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_6)" /> |
| 279 |
<rect class="bbox" width="60" height="40" /> |
| 280 |
<rect class="filterRegionControl" x="6" y="4" width="48" height="32" /> |
| 281 |
<text x="30" y="-10" class="filterRegionControlLabel">Chain Padding F</text> |
| 282 |
</g> |
| 283 |
|
| 284 |
<!-- =================================================== --> |
| 285 |
<!-- filterRegion_7 : user space primitive padding --> |
| 286 |
<!-- =================================================== --> |
| 287 |
<g transform="translate(320, 100)"> |
| 288 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_7)" /> |
| 289 |
<rect class="bbox" width="60" height="40" /> |
| 290 |
<rect class="filterRegionControl" x="5" y="5" width="50" height="30" /> |
| 291 |
<text x="30" y="-10" class="filterRegionControlLabel">Primitive Padding A</text> |
| 292 |
</g> |
| 293 |
|
| 294 |
<!-- =================================================== --> |
| 295 |
<!-- filterRegion_8 : user space primitive padding --> |
| 296 |
<!-- =================================================== --> |
| 297 |
<g transform="translate(320, 200)"> |
| 298 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_8)" /> |
| 299 |
<rect class="bbox" width="60" height="40" /> |
| 300 |
<rect class="filterRegionControl" x="5" y="5" width="50" height="30" /> |
| 301 |
<text x="30" y="-10" class="filterRegionControlLabel">Primitive Padding B</text> |
| 302 |
</g> |
| 303 |
|
| 304 |
<!-- =================================================== --> |
| 305 |
<!-- filterRegion_9 : object BB primitive padding --> |
| 306 |
<!-- =================================================== --> |
| 307 |
<g transform="translate(320, 300)"> |
| 308 |
<rect x="0" y="0" width="60" height="40" filter="url(#filterRegion_9)" /> |
| 309 |
<rect class="bbox" width="60" height="40" /> |
| 310 |
<rect class="filterRegionControl" x="6" y="4" width="48" height="32" /> |
| 311 |
<text x="30" y="-10" class="filterRegionControlLabel">Primitive Padding C</text> |
| 312 |
</g> |
| 313 |
|
| 314 |
|
| 315 |
<!-- ============================================================= --> |
| 316 |
<!-- Batik sample mark --> |
| 317 |
<!-- ============================================================= --> |
| 318 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 319 |
|
| 320 |
</svg> |