| 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 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 7 |
contributor license agreements. See the NOTICE file distributed with |
| 8 |
this work for additional information regarding copyright ownership. |
| 9 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 10 |
(the "License"); you may not use this file except in compliance with |
| 11 |
the License. You may obtain a copy of the License at |
| 12 |
|
| 13 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 14 |
|
| 15 |
Unless required by applicable law or agreed to in writing, software |
| 16 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 17 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 |
See the License for the specific language governing permissions and |
| 19 |
limitations under the License. |
| 20 |
--> |
| 21 |
|
| 22 |
<!-- ========================================================================= --> |
| 23 |
<!-- This test validates that the fill and stroke opacity values are taken --> |
| 24 |
<!-- into account for all the types of Paint servers --> |
| 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>Paint Server Opacity Test</title> |
| 33 |
|
| 34 |
<style type="text/css"><![CDATA[ |
| 35 |
.markedPath { fill:none; stroke:black; stroke-width:.5; } |
| 36 |
]]></style> |
| 37 |
|
| 38 |
<g id="content"> |
| 39 |
|
| 40 |
<text class="title" x="50%" y="40">Paint Server Opacity Test</text> |
| 41 |
|
| 42 |
<defs> |
| 43 |
|
| 44 |
<pattern id="transparencyPattern" viewBox="0 0 10 10" x="0" y="0" width="10" height="10" |
| 45 |
patternContentUnits="userSpaceOnUse" patternUnits="userSpaceOnUse"> |
| 46 |
<g fill="#eee" stroke="none"> |
| 47 |
<rect x="0" y="0" width="5" height="5" /> |
| 48 |
<rect x="5" y="5" width="5" height="5" /> |
| 49 |
</g> |
| 50 |
</pattern> |
| 51 |
|
| 52 |
<pattern id="testPattern" viewBox="0 0 20 20" x="0" y="0" width="20" height="20" |
| 53 |
patternContentUnits="userSpaceOnUse" patternUnits="userSpaceOnUse"> |
| 54 |
<g transform="scale(2, 2)"> |
| 55 |
<g fill="crimson" stroke="none"> |
| 56 |
<rect x="0" y="0" width="5" height="5" /> |
| 57 |
<rect x="5" y="5" width="5" height="5" /> |
| 58 |
</g> |
| 59 |
<g fill="gold" stroke="none"> |
| 60 |
<rect x="5" y="0" width="5" height="5" /> |
| 61 |
<rect x="0" y="5" width="5" height="5" /> |
| 62 |
</g> |
| 63 |
</g> |
| 64 |
</pattern> |
| 65 |
|
| 66 |
<radialGradient id="testRadialGradient" gradientUnits="userSpaceOnUse" cx="10" cy="10" r="40"> |
| 67 |
<stop stop-color="crimson" offset="0" /> |
| 68 |
<stop stop-color="gold" offset=".5" /> |
| 69 |
<stop stop-color="gold" stop-opacity=".5" offset="1" /> |
| 70 |
</radialGradient> |
| 71 |
|
| 72 |
<linearGradient id="testLinearGradient" gradientUnits="userSpaceOnUse" x1="-25" y1="0" x2="25" y2="0"> |
| 73 |
<stop stop-color="crimson" offset="0" /> |
| 74 |
<stop stop-color="gold" offset=".5" /> |
| 75 |
<stop stop-color="gold" stop-opacity=".5" offset="1" /> |
| 76 |
</linearGradient> |
| 77 |
|
| 78 |
<circle id="filledShape" cx="0" cy="0" r="25" /> |
| 79 |
</defs> |
| 80 |
|
| 81 |
<g transform="translate(25, 60)"> |
| 82 |
|
| 83 |
<g id="grid" stroke="black" fill="none"> |
| 84 |
<rect x="40" y="20" width="360" height="380" fill="url(#transparencyPattern)"/> |
| 85 |
|
| 86 |
<g fill="rgb(240, 240, 240)" > |
| 87 |
<rect x="0" y="20" width="20" height="190" /> |
| 88 |
<rect x="0" y="210" width="20" height="190" /> |
| 89 |
|
| 90 |
<rect x="20" y="20" width="20" height="63" /> |
| 91 |
<rect x="20" y="83" width="20" height="63" /> |
| 92 |
<rect x="20" y="146" width="20" height="64" /> |
| 93 |
|
| 94 |
<g transform="translate(0, 190)"> |
| 95 |
<rect x="20" y="20" width="20" height="63" /> |
| 96 |
<rect x="20" y="83" width="20" height="63" /> |
| 97 |
<rect x="20" y="146" width="20" height="64" /> |
| 98 |
</g> |
| 99 |
|
| 100 |
<rect x="40" y="0" width="90" height="20" /> |
| 101 |
<rect x="130" y="0" width="90" height="20" /> |
| 102 |
<rect x="220" y="0" width="90" height="20" /> |
| 103 |
<rect x="310" y="0" width="90" height="20" /> |
| 104 |
|
| 105 |
</g> |
| 106 |
|
| 107 |
<g class="label" text-anchor="middle" stroke="none" fill="black"> |
| 108 |
<text x="85" y="15">rgb</text> |
| 109 |
<text x="175" y="15">radial grad</text> |
| 110 |
<text x="265" y="15">linear grad</text> |
| 111 |
<text x="355" y="15">pattern</text> |
| 112 |
|
| 113 |
<text x="15" y="115" transform="rotate(-90, 15, 115)">fill</text> |
| 114 |
<text x="15" y="305" transform="rotate(-90, 15, 305)">stroke</text> |
| 115 |
|
| 116 |
<text x="35" y="51.5" transform="rotate(-90, 35, 51.5)">opaque</text> |
| 117 |
<text x="35" y="51.5" transform="translate(0, 63) rotate(-90, 35, 51.5)">fill-opac.</text> |
| 118 |
<text x="35" y="51.5" transform="translate(0, 126) rotate(-90, 35, 51.5)">combo</text> |
| 119 |
|
| 120 |
<g transform="translate(0, 190)"> |
| 121 |
<text x="35" y="51.5" transform="rotate(-90, 35, 51.5)">opaque</text> |
| 122 |
<text x="35" y="51.5" transform="translate(0, 63) rotate(-90, 35, 51.5)">fill-opac.</text> |
| 123 |
<text x="35" y="51.5" transform="translate(0, 126) rotate(-90, 35, 51.5)">combo</text> |
| 124 |
</g> |
| 125 |
</g> |
| 126 |
|
| 127 |
<line x1="130" y1="20" x2="130" y2="400" /> |
| 128 |
<line x1="130" y1="20" x2="130" y2="400" transform="translate(90, 0)"/> |
| 129 |
<line x1="130" y1="20" x2="130" y2="400" transform="translate(180, 0)"/> |
| 130 |
<line x1="130" y1="20" x2="130" y2="400" transform="translate(270, 0)"/> |
| 131 |
|
| 132 |
<line x1="40" y1="83" x2="400" y2="83" /> |
| 133 |
<line x1="40" y1="83" x2="400" y2="83" transform="translate(0, 63)"/> |
| 134 |
<line x1="40" y1="83" x2="400" y2="83" transform="translate(0, 127)"/> |
| 135 |
<line x1="40" y1="83" x2="400" y2="83" transform="translate(0, 190)"/> |
| 136 |
<line x1="40" y1="83" x2="400" y2="83" transform="translate(0, 253)"/> |
| 137 |
<line x1="40" y1="83" x2="400" y2="83" transform="translate(0, 317)"/> |
| 138 |
</g> |
| 139 |
|
| 140 |
<!-- ==================================== --> |
| 141 |
<!-- rgb colors --> |
| 142 |
<!-- ==================================== --> |
| 143 |
|
| 144 |
<!-- fill --> |
| 145 |
<use xlink:href="#filledShape" x="85" y="51.5" fill="crimson"/> |
| 146 |
<use xlink:href="#filledShape" x="85" y="51.5" fill="crimson" fill-opacity=".5" transform="translate(0, 63)" /> |
| 147 |
<use xlink:href="#filledShape" x="85" y="51.5" fill="crimson" fill-opacity=".5" opacity=".5" transform="translate(0, 126)"/> |
| 148 |
|
| 149 |
<!-- stroke --> |
| 150 |
<g stroke="gold" stroke-width="10" fill="none" transform="translate(0, 190)"> |
| 151 |
<use xlink:href="#filledShape" x="85" y="51.5" /> |
| 152 |
<use xlink:href="#filledShape" x="85" y="51.5" stroke-opacity=".5" transform="translate(0, 63)" /> |
| 153 |
<use xlink:href="#filledShape" x="85" y="51.5" stroke-opacity=".5" opacity=".5" transform="translate(0, 126)"/> |
| 154 |
</g> |
| 155 |
|
| 156 |
<!-- ==================================== --> |
| 157 |
<!-- radial gradient --> |
| 158 |
<!-- ==================================== --> |
| 159 |
|
| 160 |
<g transform="translate(90, 0)"> |
| 161 |
|
| 162 |
<!-- fill --> |
| 163 |
<g fill="url(#testRadialGradient)"> |
| 164 |
<use xlink:href="#filledShape" x="85" y="51.5" /> |
| 165 |
<use xlink:href="#filledShape" x="85" y="51.5" fill-opacity=".5" transform="translate(0, 63)" /> |
| 166 |
<use xlink:href="#filledShape" x="85" y="51.5" fill-opacity=".5" opacity=".5" transform="translate(0, 126)"/> |
| 167 |
</g> |
| 168 |
|
| 169 |
<!-- stroke --> |
| 170 |
<g stroke="url(#testRadialGradient)" stroke-width="10" fill="none" transform="translate(0, 190)"> |
| 171 |
<use xlink:href="#filledShape" x="85" y="51.5" /> |
| 172 |
<use xlink:href="#filledShape" x="85" y="51.5" stroke-opacity=".5" transform="translate(0, 63)" /> |
| 173 |
<use xlink:href="#filledShape" x="85" y="51.5" stroke-opacity=".5" opacity=".5" transform="translate(0, 126)"/> |
| 174 |
</g> |
| 175 |
|
| 176 |
</g> |
| 177 |
|
| 178 |
<!-- ==================================== --> |
| 179 |
<!-- linear gradient --> |
| 180 |
<!-- ==================================== --> |
| 181 |
|
| 182 |
<g transform="translate(180, 0)"> |
| 183 |
|
| 184 |
<!-- fill --> |
| 185 |
<g fill="url(#testLinearGradient)"> |
| 186 |
<use xlink:href="#filledShape" x="85" y="51.5" /> |
| 187 |
<use xlink:href="#filledShape" x="85" y="51.5" fill-opacity=".5" transform="translate(0, 63)" /> |
| 188 |
<use xlink:href="#filledShape" x="85" y="51.5" fill-opacity=".5" opacity=".5" transform="translate(0, 126)"/> |
| 189 |
</g> |
| 190 |
|
| 191 |
<!-- stroke --> |
| 192 |
<g stroke="url(#testLinearGradient)" stroke-width="10" fill="none" transform="translate(0, 190)"> |
| 193 |
<use xlink:href="#filledShape" x="85" y="51.5" /> |
| 194 |
<use xlink:href="#filledShape" x="85" y="51.5" stroke-opacity=".5" transform="translate(0, 63)" /> |
| 195 |
<use xlink:href="#filledShape" x="85" y="51.5" stroke-opacity=".5" opacity=".5" transform="translate(0, 126)"/> |
| 196 |
</g> |
| 197 |
|
| 198 |
</g> |
| 199 |
|
| 200 |
<!-- ==================================== --> |
| 201 |
<!-- patterns --> |
| 202 |
<!-- ==================================== --> |
| 203 |
|
| 204 |
<g transform="translate(270, 0)"> |
| 205 |
|
| 206 |
<!-- fill --> |
| 207 |
<g fill="url(#testPattern)"> |
| 208 |
<use xlink:href="#filledShape" x="85" y="51.5" /> |
| 209 |
<use xlink:href="#filledShape" x="85" y="51.5" fill-opacity=".5" transform="translate(0, 63)" /> |
| 210 |
<use xlink:href="#filledShape" x="85" y="51.5" fill-opacity=".5" opacity=".5" transform="translate(0, 126)"/> |
| 211 |
</g> |
| 212 |
|
| 213 |
<!-- stroke --> |
| 214 |
<g stroke="url(#testPattern)" stroke-width="10" fill="none" transform="translate(0, 190)"> |
| 215 |
<use xlink:href="#filledShape" x="85" y="51.5" /> |
| 216 |
<use xlink:href="#filledShape" x="85" y="51.5" stroke-opacity=".5" transform="translate(0, 63)" /> |
| 217 |
<use xlink:href="#filledShape" x="85" y="51.5" stroke-opacity=".5" opacity=".5" transform="translate(0, 126)"/> |
| 218 |
</g> |
| 219 |
|
| 220 |
</g> |
| 221 |
|
| 222 |
</g> |
| 223 |
|
| 224 |
|
| 225 |
</g> |
| 226 |
|
| 227 |
<!-- ============================================================= --> |
| 228 |
<!-- Batik sample mark --> |
| 229 |
<!-- ============================================================= --> |
| 230 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 231 |
|
| 232 |
</svg> |