| <?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. |
| |
| --> |
| <!-- ========================================================================= --> |
| <!-- Test use and styling --> |
| <!-- --> |
| <!-- @author tkormann@ilog.fr --> |
| <!-- @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" width="450" height="500" viewBox="0 0 450 500"> |
| <title>Test use and styling using URIs</title> |
| |
| <!-- ============================================================= --> |
| <!-- Test content --> |
| <!-- ============================================================= --> |
| <g id="testContent" transform="translate(0 -40)"> |
| <text x="225" y="60" class="title"><use> and styling using URIs</text> |
| <text x="225" y="80" style="text-anchor:middle; font-size:12; font-style:italic">This file is using the defs.svg file to get the external resources</text> |
| |
| <g font-size="10"> |
| <text x="20" y="496">- linearGradient defined in this file (local)</text> |
| <text x="20" y="508">- radialGradient defined in defs.svg (external)</text> |
| <text x="20" y="520">- gold/crimson: gradient on <rect>, white/black: gradient on <use></text> |
| <text x="26" y="532">yellow/green: inherited from <g></text> |
| </g> |
| |
| <!-- ############################### --> |
| <g id="board" style="fill:none; stroke:black;"> |
| |
| <g style="fill:#eee"> |
| <rect x="75" y="100" width="150" height="20" /> |
| <rect x="225" y="100" width="150" height="20" /> |
| |
| <rect x="35" y="120" width="20" height="120" /> |
| <rect x="35" y="240" width="20" height="120" /> |
| <rect x="35" y="360" width="20" height="120" /> |
| |
| </g> |
| |
| <g style="fill:#ccc"> |
| <rect x="55" y="120" width="20" height="60" /> |
| <rect x="55" y="180" width="20" height="60" /> |
| <rect x="55" y="240" width="20" height="60" /> |
| <rect x="55" y="300" width="20" height="60" /> |
| <rect x="55" y="360" width="20" height="60" /> |
| <rect x="55" y="420" width="20" height="60" /> |
| </g> |
| |
| <rect x="75" y="120" width="150" height="360" /> |
| <rect x="225" y="120" width="150" height="360" /> |
| |
| <line x1="75" y1="180" x2="375" y2="180" /> |
| <line x1="75" y1="240" x2="375" y2="240" /> |
| <line x1="75" y1="300" x2="375" y2="300" /> |
| <line x1="75" y1="360" x2="375" y2="360" /> |
| <line x1="75" y1="420" x2="375" y2="420" /> |
| <line x1="75" y1="480" x2="375" y2="480" /> |
| |
| <g style="font-size:12; text-anchor:middle; fill:black; stroke:none"> |
| <text x="150" y="114">Local <use></text> |
| <text x="300" y="114">External <use></text> |
| |
| <text x="0" y="0" transform="translate(50 180) rotate(-90)">internal style on</text> |
| <text x="0" y="0" transform="translate(50 300) rotate(-90)">external style on</text> |
| <text x="0" y="0" transform="translate(50 420) rotate(-90)">inherited style</text> |
| |
| <text x="0" y="0" transform="translate(70 150) rotate(-90)"><rect></text> |
| <text x="0" y="0" transform="translate(70 210) rotate(-90)"><use></text> |
| <text x="0" y="0" transform="translate(70 270) rotate(-90)"><rect></text> |
| <text x="0" y="0" transform="translate(70 330) rotate(-90)"><use></text> |
| <text x="0" y="0" transform="translate(70 390) rotate(-90)">internal</text> |
| <text x="0" y="0" transform="translate(70 450) rotate(-90)">external</text> |
| </g> |
| </g> |
| |
| |
| <!-- ############################### --> |
| <defs> |
| |
| <linearGradient id="grad1"> |
| <stop style="stop-color:gold" offset="0" /> |
| <stop style="stop-color:crimson" offset="1" /> |
| </linearGradient> |
| |
| <linearGradient id="grad2"> |
| <stop style="stop-color:white" offset="0" /> |
| <stop style="stop-color:black" offset="1" /> |
| </linearGradient> |
| |
| <linearGradient id="grad3"> |
| <stop style="stop-color:gold" offset="0" /> |
| <stop style="stop-color:green" offset="1" /> |
| </linearGradient> |
| |
| <g style="fill:black;"> <!-- ### NOTHING SHOULD BE BLACK ON THE SCREEN ### --> |
| <circle id="e" cx="25" cy="25" r="20" /> |
| <circle id="e1" cx="25" cy="25" r="20" style="fill:url(#grad1)" /> |
| <circle id="e3" cx="25" cy="25" r="20" style="fill:url(../../resources/svg/defs.svg#extGrad1)" /> |
| </g> |
| |
| </defs> |
| |
| <!-- ############################### --> |
| <!-- LOCAL USE --> |
| <!-- ############################### --> |
| <g> |
| |
| <!-- fill: internal URI on the referenced element --> |
| <use xlink:href="#e1" x="125" y="125" /> |
| |
| <!-- fill:internal URI on the use --> |
| <use xlink:href="#e" x="125" y="185" style="fill:url(#grad2)"/> |
| |
| <!-- fill: external URI on the referenced element --> |
| <use xlink:href="#e3" x="125" y="245" /> |
| |
| <!-- fill: external URI on the use --> |
| <use xlink:href="#e" x="125" y="305" style="fill:url(../../resources/svg/defs.svg#extGrad2)" /> |
| |
| <g style="fill:url(#grad3)"> |
| <!-- fill: inherited local URI --> |
| <use xlink:href="#e" x="125" y="365" /> |
| </g> |
| |
| <g style="fill:url(../../resources/svg/defs.svg#extGrad3)"> |
| <!-- fill: inherited external URI --> |
| <use xlink:href="#e" x="125" y="425" /> |
| </g> |
| </g> |
| |
| |
| <!-- ############################### --> |
| <!-- EXTERNAL USE --> |
| <!-- ############################### --> |
| <g> |
| |
| <!-- fill: internal URI on the referenced element --> |
| <use xlink:href="../../resources/svg/defs.svg#extE1" x="275" y="125" /> |
| |
| <!-- fill:internal URI on the use --> |
| <use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="185" style="fill:url(#grad2)"/> |
| |
| <!-- fill: external URI on the referenced element --> |
| <use xlink:href="../../resources/svg/defs.svg#extE2" x="275" y="245" /> |
| |
| <!-- fill: external URI on the use --> |
| <use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="305" style="fill:url(../../resources/svg/defs.svg#extGrad2)"/> |
| |
| <!-- fill: inherited local URI --> |
| <g style="fill:url(#grad3)"> |
| <use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="365" /> |
| </g> |
| |
| <!-- fill: inherited external URI --> |
| <g style="fill:url(../../resources/svg/defs.svg#extGrad3)"> |
| <use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="425" /> |
| </g> |
| |
| </g> |
| |
| </g> |
| |
| <!-- ============================================================= --> |
| <!-- Batik sample mark --> |
| <!-- ============================================================= --> |
| <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| </svg> |