Debian Codegraph @

test_non_regression/fail/na/script/masking-path-09-b.svg

raw
1 <svg id="svg-root" width="100%" height="100%"
2 viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
3 xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, European Research Consortium for =-->
7 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
8 <!--= All Rights Reserved. =-->
9 <!--= See http://www.w3.org/Consortium/Legal/. =-->
10 <!--======================================================================-->
11 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
12 template-version="1.4" reviewer="DAS" author="CM" status="accepted"
13 version="$Revision: 1.5 $" testname="$RCSfile: masking-path-09-b.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#EstablishingANewClippingPath">
15 <p>
16 This tests that a clip path applied to an element does not affect
17 bounding box computation.
18 </p>
19 </d:testDescription>
20 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
21 <p>
22 Run the test. No interaction required.
23 </p>
24 </d:operatorScript>
25 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
26 <p>
27 The test is passed if the rectangle is green. The test is failed
28 if any part of the rectangle is red.
29 </p>
30 </d:passCriteria>
31 </d:SVGTestCase>
32 <title id="test-title">$RCSfile: masking-path-09-b.svg,v $</title>
33 <defs>
34 <font-face
35 font-family="SVGFreeSansASCII"
36 unicode-range="U+0-7F">
37 <font-face-src>
38 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
39 </font-face-src>
40 </font-face>
41 </defs>
42 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
43
44 <text x='10' y='40' font-size='13'>Test bounding box calculations with clip paths</text>
45
46 <clipPath id='c' clipPathUnits='userSpaceOnUse'>
47 <rect x='10' y='50' width='50' height='50'/>
48 </clipPath>
49
50 <g id='g' clip-path='url(#c)' fill='red'>
51 <rect x='10' y='50' width='50' height='50'/>
52 <rect x='60' y='50' width='50' height='50' fill='red'/>
53 </g>
54
55 <script>
56 var g = document.getElementById('g');
57 if (g.getBBox().width == 100) {
58 g.setAttribute('fill', 'green');
59 }
60 </script>
61 </g>
62 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
63 <text id="revision" x="10" y="340" stroke="none"
64 fill="black">$Revision: 1.5 $</text>
65 </g>
66 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
67 <!-- comment out this watermark once the test is approved --><!--
68 <g id="draft-watermark">
69 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
70 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
71 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
72 </g>-->
73 </svg>