| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <!-- ========================================================================= --> |
| <!-- @author vhardy@apache.org --> |
| <!-- @version $Id$ --> |
| <!-- ========================================================================= --> |
| <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| |
| <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"> |
| |
| <title><radialGradient> Test 1 (Simple)</title> |
| <text class="title" x="50%" y="40"> |
| <radialGradient> Test 1 (Simple) |
| </text> |
| |
| <style type="text/css"><![CDATA[ |
| .speed { clip-path:url(#speedClip); color-rendering:optimizeSpeed; } |
| .default { clip-path:url(#defaultClip); color-rendering:auto; } |
| .quality { clip-path:url(#qualityClip); |
| color-rendering:optimizeQuality; } |
| .saqLabel { font-family: Verdana, Helvetica; |
| font-size: 5; |
| text-anchor: middle; |
| fill:black; stroke:none;} |
| .line { fill:none; stroke:black; stroke-width:0.25; } |
| ]]></style> |
| |
| <defs> |
| <!-- Shape filled by radial gradients --> |
| <g id="testShape"> |
| <rect x="-25" y="-20" width="50" height="40" |
| class="quality" /> |
| <rect x="-25" y="-20" width="50" height="40" |
| class="default" /> |
| <rect x="-25" y="-20" width="50" height="40" |
| class="speed" /> |
| |
| <text x="-16.5" y="24" class="saqLabel">Q</text> |
| <line x1="-8" x2="-8" y1="20" y2="25" class="line" /> |
| <text x="0" y="24" class="saqLabel">A</text> |
| <line x1="8" x2="8" y1="20" y2="25" class="line" /> |
| <text x="16.5" y="24" class="saqLabel">S</text> |
| </g> |
| |
| <!-- Clip paths for the various color-rendering settings... --> |
| <clipPath id="qualityClip"> |
| <rect x="-25" y="-20" width="17" height="40"/> |
| </clipPath> |
| |
| <clipPath id="defaultClip"> |
| <rect x="-8" y="-20" width="16" height="40"/> |
| </clipPath> |
| |
| <clipPath id="speedClip"> |
| <rect x="8" y="-20" width="17" height="40"/> |
| </clipPath> |
| |
| |
| <!-- ========================================== --> |
| <!-- Two gradients, one with no values defined --> |
| <!-- and one with the default values specified --> |
| <!-- They should create the same pattern --> |
| <!-- ========================================== --> |
| <radialGradient id="rgDefaults"> |
| <stop offset="0" stop-color="gold" /> |
| <stop offset="1" stop-color="crimson" /> |
| </radialGradient> |
| |
| <radialGradient id="rgSpecifiedDefaults" |
| gradientUnits="objectBoundingBox" |
| cx="50%" cy="50%" |
| r="50%" |
| fx="50%" fy="50%" |
| spreadMethod="pad" xlink:href="#rgDefaults" /> |
| |
| <!-- ========================================== --> |
| <!-- gradientUnits. The following gradients --> |
| <!-- is defined so as to produce the same --> |
| <!-- result as with the default settings --> |
| <!-- For example, cx default is 50% in object --> |
| <!-- bounding box, which is .5*50 = 25 --> |
| <!-- r = sqrt(50*50 + 40*40) = 22.63846284534354156643452041746 --> |
| <!-- ========================================== --> |
| <radialGradient id="rgUserSpaceOnUse" |
| cx="0" cy="0" r="22.63846284534354156643452041746" |
| fx="0" fy="0" xlink:href="#rdDefaults" /> |
| |
| <radialGradient id="rgCxCyA" xlink:href="#rgDefaults" |
| cx="0%" cy="100%"> |
| </radialGradient> |
| |
| <radialGradient id="rgCxCyB" xlink:href="#rgDefaults" |
| cx="75%" cy="25%"> |
| </radialGradient> |
| |
| <radialGradient id="rgFxFyA" xlink:href="#rgCxCyA" |
| fx="0%" fy="100%"> |
| </radialGradient> |
| |
| <radialGradient id="rgFxFyB" xlink:href="#rgDefaults" |
| fx="60%" fy="40%"> |
| </radialGradient> |
| |
| <radialGradient id="rgFxFyC" xlink:href="#rgDefaults" |
| fx="0%" fy="50%"> |
| </radialGradient> |
| |
| <radialGradient id="rgFxFyD" xlink:href="#rgDefaults" |
| fx="0%" fy="0%"> |
| </radialGradient> |
| |
| <radialGradient id="rgSpreadA" xlink:href="#rgDefaults" |
| r=".125"> |
| </radialGradient> |
| |
| <radialGradient id="rgSpreadB" xlink:href="#rgDefaults" |
| r=".125" spreadMethod="reflect"> |
| </radialGradient> |
| |
| <radialGradient id="rgSpreadC" xlink:href="#rgDefaults" |
| r=".125" spreadMethod="repeat"> |
| </radialGradient> |
| |
| <radialGradient id="rgTxfA" xlink:href="#rgDefaults" |
| gradientTransform="translate(.5, .5)" /> |
| |
| <radialGradient id="rgTxfB" xlink:href="#rgDefaults" |
| cx="0%" cy="0%" gradientTransform="translate(.5, .5)" /> |
| |
| <radialGradient id="rgTxfC" xlink:href="#rgDefaults" |
| cx="0%" cy="0%" gradientTransform="translate(.5, .5) scale(1.5, .25)" /> |
| |
| <radialGradient id="rgTxfD" xlink:href="#rgFxFyD" |
| gradientTransform="scale(.5, .5)" /> |
| |
| </defs> |
| |
| <g class="legend"> |
| |
| <g transform="translate(70, 0)"> |
| <g transform="translate(0, 100)"> |
| <use xlink:href="#testShape" fill="url(#rgDefaults)" /> |
| <text y="-30">Defaults</text> |
| </g> |
| |
| <g transform="translate(0, 170)"> |
| <use xlink:href="#testShape" fill="url(#rgSpecifiedDefaults)" /> |
| <text y="-30">Forced Defaults</text> |
| </g> |
| |
| <g transform="translate(0, 240)"> |
| <use xlink:href="#testShape" fill="url(#rgSpecifiedDefaults)" /> |
| <text y="-30">userSpaceOnUse</text> |
| </g> |
| |
| <g transform="translate(0, 310)"> |
| <use xlink:href="#testShape" fill="url(#rgCxCyA)" /> |
| <text y="-30">(cx,cy) = (0%, 100%)</text> |
| </g> |
| |
| <g transform="translate(0, 380)"> |
| <use xlink:href="#testShape" fill="url(#rgCxCyB)" /> |
| <text y="-30">(cx,cy) = (75%, 25%)</text> |
| </g> |
| |
| </g> |
| |
| <g transform="translate(200, 0)"> |
| |
| <g transform="translate(0, 100)"> |
| <use xlink:href="#testShape" fill="url(#rgFxFyB)" /> |
| <text y="-30">(fx,fy)=(60%,40%)</text> |
| </g> |
| |
| <g transform="translate(0, 170)"> |
| <use xlink:href="#testShape" fill="url(#rgFxFyC)" /> |
| <text y="-30">(fx,fy)=(0%,50%)</text> |
| </g> |
| |
| <g transform="translate(0, 240)"> |
| <use xlink:href="#testShape" fill="url(#rgFxFyD)" /> |
| <text y="-30">(fx,fy)=(0%,0%)</text> |
| </g> |
| |
| <g transform="translate(0, 310)"> |
| <use xlink:href="#testShape" fill="url(#rgSpreadA)" /> |
| <text y="-30">r=.125, spread=default</text> |
| </g> |
| |
| <g transform="translate(0, 380)"> |
| <use xlink:href="#testShape" fill="url(#rgSpreadB)" /> |
| <text y="-30">r=.125, spread=reflect</text> |
| </g> |
| |
| <g transform="translate(0, 450)"> |
| <use xlink:href="#testShape" fill="url(#rgSpreadC)" /> |
| <text y="-30">r=.125, spread=repeat</text> |
| </g> |
| |
| </g> |
| |
| |
| <g transform="translate(330, 0)"> |
| |
| <g transform="translate(0, 100)"> |
| <use xlink:href="#testShape" fill="url(#rgTxfA)" /> |
| <text y="-30">translate(.5,.5)</text> |
| </g> |
| |
| <g transform="translate(0, 170)"> |
| <use xlink:href="#testShape" fill="url(#rgTxfB)" /> |
| <text y="-30">(cx,cy)=(0%,0%) translate(.5,.5)</text> |
| </g> |
| |
| <g transform="translate(0, 240)"> |
| <use xlink:href="#testShape" fill="url(#rgTxfC)" /> |
| <text y="-30">scale(1.5,.25)</text> |
| </g> |
| |
| <g transform="translate(0, 310)"> |
| <use xlink:href="#testShape" fill="url(#rgTxfD)" /> |
| <text y="-30">(fx,fy)=(0,0) scale(.5, .5)</text> |
| </g> |
| |
| <g transform="translate(0, 380)"> |
| <use xlink:href="#testShape" fill="url(#rgFxFyA)" /> |
| <text y="-30">(fx,fy)=(cx, cy)=(0%, 100%)</text> |
| </g> |
| |
| |
| </g> |
| |
| </g> |
| </svg> |