| 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 |
<!-- feTile test --> |
| 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" id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 33 |
<title>feTile Test</title> |
| 34 |
|
| 35 |
<!-- ============================================================= --> |
| 36 |
<!-- Test content --> |
| 37 |
<!-- ============================================================= --> |
| 38 |
<g id="testContent" class="legend" style="text-anchor:middle"> |
| 39 |
<text x="225" y="40" class="title"> |
| 40 |
feTile Test |
| 41 |
</text> |
| 42 |
|
| 43 |
<defs> |
| 44 |
<linearGradient id="tileFill" gradientUnits="objectBoundingBox" |
| 45 |
x1="0" y1="0" x2="1" y2="1"> |
| 46 |
<stop offset="0" stop-color="white" /> |
| 47 |
<stop offset=".5" stop-color="#44ccff" /> |
| 48 |
<stop offset="1" stop-color="#000033" /> |
| 49 |
</linearGradient> |
| 50 |
|
| 51 |
<!-- ============================== --> |
| 52 |
<!-- Simple tile in top left corner --> |
| 53 |
<!-- ============================== --> |
| 54 |
<filter id="tile_1" primitiveUnits="objectBoundingBox" |
| 55 |
filterUnits="objectBoundingBox" |
| 56 |
x="0" y="0" width="200%" height="200%"> |
| 57 |
<feOffset x="0%" y="0%" width="100%" height="100%"/> |
| 58 |
<feTile /> |
| 59 |
</filter> |
| 60 |
|
| 61 |
<!-- =============================== --> |
| 62 |
<!-- Tile in center of filter region --> |
| 63 |
<!-- =============================== --> |
| 64 |
<filter id="tile_2" primitiveUnits="objectBoundingBox" |
| 65 |
filterUnits="objectBoundingBox" |
| 66 |
x="-50%" y="-50%" width="200%" height="200%"> |
| 67 |
<feOffset x="0%" y="0%" width="100%" height="100%"/> |
| 68 |
<feTile /> |
| 69 |
</filter> |
| 70 |
|
| 71 |
<!-- =============================== --> |
| 72 |
<!-- Tile offset in top left corner --> |
| 73 |
<!-- =============================== --> |
| 74 |
<filter id="tile_3" primitiveUnits="objectBoundingBox" |
| 75 |
filterUnits="objectBoundingBox" |
| 76 |
x="-25%" y="-25%" width="200%" height="200%"> |
| 77 |
<feOffset x="0%" y="0%" width="100%" height="100%"/> |
| 78 |
<feTile /> |
| 79 |
</filter> |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
</defs> |
| 85 |
|
| 86 |
<g transform="translate(20, 100)"> |
| 87 |
<rect x="0" y="0" width="50" height="25" style="fill:url(#tileFill); filter:url(#tile_1)"/> |
| 88 |
<rect x="0" y="0" width="100" height="50" style="fill:none; stroke:black;"/> |
| 89 |
<text x="50" y="-15">tile_1</text> |
| 90 |
<text x="50" y="-3">4 tiles, quarter size</text> |
| 91 |
</g> |
| 92 |
|
| 93 |
<g transform="translate(20, 200)"> |
| 94 |
<rect x="25" y="12.5" width="50" height="25" style="fill:url(#tileFill); filter:url(#tile_2)"/> |
| 95 |
<rect x="0" y="0" width="100" height="50" style="fill:none; stroke:black;"/> |
| 96 |
<text x="50" y="-15">tile_2 (centered)</text> |
| 97 |
<text x="50" y="-3">9 tiles, 1 full, 8 partial</text> |
| 98 |
</g> |
| 99 |
|
| 100 |
<g transform="translate(32.5, 307.25)"> |
| 101 |
<rect x="0" y="0" width="50" height="25" style="fill:url(#tileFill); filter:url(#tile_3)"/> |
| 102 |
<rect x="-12.5" y="-7.25" width="100" height="50" style="fill:none; stroke:black;"/> |
| 103 |
<text x="37.5" y="-22.25">tile_3 (top left offset)</text> |
| 104 |
<text x="37.5" y="-10.25">9 tiles, 1 full, 8 partial</text> |
| 105 |
</g> |
| 106 |
|
| 107 |
<g transform="translate(245, 100) skewX(30)"> |
| 108 |
<rect x="0" y="0" width="50" height="25" style="fill:url(#tileFill); filter:url(#tile_1)"/> |
| 109 |
<rect x="0" y="0" width="100" height="50" style="fill:none; stroke:black;"/> |
| 110 |
</g> |
| 111 |
<g transform="translate(245, 100)"> |
| 112 |
<text x="50" y="-15">tile_1</text> |
| 113 |
<text x="50" y="-3">skewed X</text> |
| 114 |
</g> |
| 115 |
|
| 116 |
<g transform="translate(245, 200) translate(50, 30) rotate(20) scale(.7, .7) translate(-50, -25)"> |
| 117 |
<rect x="25" y="12.5" width="50" height="25" style="fill:url(#tileFill); filter:url(#tile_2)"/> |
| 118 |
<rect x="0" y="0" width="100" height="50" style="fill:none; stroke:black;"/> |
| 119 |
</g> |
| 120 |
<g transform="translate(245, 200)"> |
| 121 |
<text x="50" y="-15">tile_2</text> |
| 122 |
<text x="50" y="-3">(centered, rotate & scale)</text> |
| 123 |
</g> |
| 124 |
|
| 125 |
<g transform="translate(257.5, 307.25) translate(-12.5, 0) skewY(15) translate(12.5, 0)"> |
| 126 |
<rect x="0" y="0" width="50" height="25" style="fill:url(#tileFill); filter:url(#tile_3)"/> |
| 127 |
<rect x="-12.5" y="-6.25" width="100" height="50" style="fill:none; stroke:black;"/> |
| 128 |
</g> |
| 129 |
<g transform="translate(257.5, 307.25) "> |
| 130 |
<text x="37.5" y="-22.25">tile_3 (top left offset)</text> |
| 131 |
<text x="37.5" y="-10.25">skewed Y</text> |
| 132 |
</g> |
| 133 |
|
| 134 |
</g> |
| 135 |
|
| 136 |
<!-- Link to visual reference --> |
| 137 |
<a xlink:href="feTileTarget.svg" xlink:show="new"> |
| 138 |
<text x="20" y="475">How it should look like...</text> |
| 139 |
</a> |
| 140 |
|
| 141 |
|
| 142 |
<!-- ============================================================= --> |
| 143 |
<!-- Batik sample mark --> |
| 144 |
<!-- ============================================================= --> |
| 145 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 146 |
|
| 147 |
</svg> |