blob: d2867ba06139f75ed8f28f006b93ac9fc42e95b7 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="basic" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- struct-use-05-b.svg -->
<!-- -->
<!-- Tests external references and computed inherited values -->
<!-- -->
<!-- Author : Corel SVG Viewer QA team 01-05-2003 -->
<!-- Revised by: Benoit Bezaire -->
<!-- -->
<!--======================================================================-->
<SVGTestCase
xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/description/"
xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
owner="BB" reviewer="CL" desc="Tests external references and
computed inherited values" status="accepted" version="$Revision: 1.6 $" testname="$RCSfile: struct-use-05-b.svg,v $">
<OperatorScript>
<Paragraph>This file is intented to test the computed values in external references.
Both files (referencing and referenced) define similar colors/gradients via 'color', 'linearGradient' and 'radialGradient'.
The ids of those definitions are the same but the actual appearance are different. These definitions are used to test the
property inheritance feature of SVG.
</Paragraph>
<Paragraph>The top left rectangle should be filled with the blue linear gradient since the 'use' has a specified value
defined in the 'defs' section. The top right rectangle is forestgreen since the 'use' has a computed value.
The bottom left rectangle is also forestgreen since the fill is not inherited from the referenced element's original parent.
The bottom right rectangle is filled with the orange radial gradient since the computed value is given by the CSS cascade.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">struct-use-05-b.svg</title>
<desc id="test-desc">Tests external references and computed inherited values</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="testContent" color="forestgreen">
<defs>
<linearGradient id="linearGrad1" gradientUnits="objectBoundingBox" y1="0" x1="0" y2="1" x2="1">
<stop offset="000%" stop-color="royalblue"/>
<stop offset="033%" stop-color="white"/>
<stop offset="050%" stop-color="darkblue"/>
<stop offset="066%" stop-color="white"/>
<stop offset="100%" stop-color="royalblue"/>
</linearGradient>
<radialGradient id="radialGrad1" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.5" fx="0.15" fy="0.15">
<stop offset="000%" stop-color="royalblue"/>
<stop offset="033%" stop-color="white"/>
<stop offset="050%" stop-color="darkblue"/>
<stop offset="066%" stop-color="white"/>
<stop offset="100%" stop-color="royalblue"/>
</radialGradient>
</defs>
<use xlink:href="resources/svgRef1.svg#rect1" fill="url(#linearGrad1)"/>
<use xlink:href="resources/svgRef1.svg#rect2" fill="currentColor"/>
<use xlink:href="resources/svgRef1.svg#rect3"/>
<use xlink:href="resources/svgRef1.svg#rect4"/>
</g>
<text font-size="24" x="240" y="35" text-anchor="middle">External references and computed values</text>
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.6 $</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
</svg>