| 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 |
<!-- Gradients on Points. --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ====================================================================== --> |
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
<svg id="body" width="450" height="500" viewBox="0 0 450 500" |
| 31 |
xmlns="http://www.w3.org/2000/svg" |
| 32 |
xmlns:xlink="http://www.w3.org/1999/xlink" > |
| 33 |
|
| 34 |
<title>Gradients on Points</title> |
| 35 |
<text x="50%" y="45" class="title">Gradients on Points</text> |
| 36 |
|
| 37 |
<g id="testContent"> |
| 38 |
|
| 39 |
<defs> |
| 40 |
<linearGradient id="hGrad" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse"> |
| 41 |
<stop offset="0" style="stop-color:crimson" /> |
| 42 |
<stop offset="1" style="stop-color:gold" /> |
| 43 |
</linearGradient> |
| 44 |
<linearGradient id="vGrad" x1="0" y1="0" x2="0" y2="1" gradientUnits="userSpaceOnUse"> |
| 45 |
<stop offset="0" style="stop-color:crimson" /> |
| 46 |
<stop offset="1" style="stop-color:gold" /> |
| 47 |
</linearGradient> |
| 48 |
<linearGradient id="hvGrad" x1="0" y1="0" x2="1" y2="1" gradientUnits="userSpaceOnUse"> |
| 49 |
<stop offset="0" style="stop-color:crimson" /> |
| 50 |
<stop offset="1" style="stop-color:gold" /> |
| 51 |
</linearGradient> |
| 52 |
|
| 53 |
<radialGradient id="rGrad" cx=".5" cy=".5" r="1" gradientUnits="userSpaceOnUse"> |
| 54 |
<stop offset="0" style="stop-color:crimson" /> |
| 55 |
<stop offset="1" style="stop-color:gold" /> |
| 56 |
</radialGradient> |
| 57 |
</defs> |
| 58 |
|
| 59 |
<g style="fill:#eee;stroke:black"> |
| 60 |
<rect x="75" y="100" width="300" height="20" /> |
| 61 |
<rect x="55" y="120" width="20" height="300" /> |
| 62 |
</g> |
| 63 |
|
| 64 |
<g style="fill:none;stroke:black"> |
| 65 |
<rect x="75" y="120" width="300" height="300" /> |
| 66 |
<line x1="150" y1="100" x2="150" y2="420" /> |
| 67 |
<line x1="225" y1="100" x2="225" y2="420" /> |
| 68 |
<line x1="300" y1="100" x2="300" y2="420" /> |
| 69 |
|
| 70 |
<line x1="55" y1="220" x2="375" y2="220" /> |
| 71 |
<line x1="55" y1="320" x2="375" y2="320" /> |
| 72 |
</g> |
| 73 |
|
| 74 |
<g style="text-anchor:middle; fill:black; stroke:none"> |
| 75 |
<text x="112" y="115">hLinGrad</text> |
| 76 |
<text x="187" y="115">vLinGrad</text> |
| 77 |
<text x="262" y="115">hvLinGrad</text> |
| 78 |
<text x="337" y="115">radGrad</text> |
| 79 |
|
| 80 |
<text transform="translate(70 170)rotate(-90)">No Scale</text> |
| 81 |
<text transform="translate(70 270)rotate(-90)">Scale Up</text> |
| 82 |
<text transform="translate(70 370)rotate(-90)">Scale Down</text> |
| 83 |
</g> |
| 84 |
|
| 85 |
<g stroke-linecap="round"> |
| 86 |
<g stroke-width="50"> |
| 87 |
<line transform="translate(112,170)" stroke="url(#hGrad)" /> |
| 88 |
<line transform="translate(187,170)" stroke="url(#vGrad)" /> |
| 89 |
<line transform="translate(262,170)" stroke="url(#hvGrad)"/> |
| 90 |
<line transform="translate(337,170)" stroke="url(#rGrad)" /> |
| 91 |
</g> |
| 92 |
|
| 93 |
<!-- Note that I wanted to scale this even more agressively |
| 94 |
But it appears that very narrow stroke-widths just get |
| 95 |
clamped to something like '0.0001' - Odd! --> |
| 96 |
<g stroke-width=".005"> |
| 97 |
<line transform="translate(112,270) scale(10000)" |
| 98 |
stroke="url(#hGrad)" /> |
| 99 |
<line transform="translate(187,270) scale(10000)" |
| 100 |
stroke="url(#vGrad)" /> |
| 101 |
<line transform="translate(262,270) scale(10000)" |
| 102 |
stroke="url(#hvGrad)" /> |
| 103 |
<line transform="translate(337,270) scale(10000)" |
| 104 |
stroke="url(#rGrad)" /> |
| 105 |
</g> |
| 106 |
|
| 107 |
|
| 108 |
<g stroke-width="50000000"> |
| 109 |
<line transform="translate(112,370) scale(.000001)" |
| 110 |
stroke="url(#hGrad)" /> |
| 111 |
<line transform="translate(187,370) scale(.000001)" |
| 112 |
stroke="url(#vGrad)" /> |
| 113 |
<line transform="translate(262,370) scale(.000001)" |
| 114 |
stroke="url(#hvGrad)" /> |
| 115 |
<line transform="translate(337,370) scale(.000001)" |
| 116 |
stroke="url(#rGrad)" /> |
| 117 |
</g> |
| 118 |
</g> |
| 119 |
|
| 120 |
</g> |
| 121 |
|
| 122 |
<!-- ============================================================= --> |
| 123 |
<!-- Batik sample mark --> |
| 124 |
<!-- ============================================================= --> |
| 125 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 126 |
|
| 127 |
</svg> |