Debian Codegraph @

test_non_regression/svg/painting-control-05-f.svg

raw
1 <svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2 <!--======================================================================-->
3 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
4 <!--= Institute of Technology, European Research Consortium for =-->
5 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
6 <!--= All Rights Reserved. =-->
7 <!--= See http://www.w3.org/Consortium/Legal/. =-->
8 <!--======================================================================-->
9 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" template-version="1.4" reviewer="ED" author="Microsoft" status="accepted" version="$Revision: 1.3 $" testname="$RCSfile: painting-control-05-f.svg,v $">
10 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/painting.html#VisibilityControl">
11 <p>
12 This tests setting the 'display' property to 'none' on an element that is a child of a 'mask' or 'clipPath' element, which should cause the element to not be
13 included in the 'mask' or 'clip' region.
14 </p>
15 </d:testDescription>
16 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
17 <p>
18 Run the test. No interaction required.
19 </p>
20 </d:operatorScript>
21 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
22 <p>
23 The test is passed if there are 8 green rectangles visible, and no red.
24 </p>
25 </d:passCriteria>
26 </d:SVGTestCase>
27 <title id="test-title">$RCSfile: painting-control-05-f.svg,v $</title>
28 <defs>
29 <font-face
30 font-family="SVGFreeSansASCII"
31 unicode-range="U+0-7F">
32 <font-face-src>
33 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
34 </font-face-src>
35 </font-face>
36 </defs>
37 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
38 <defs>
39 <rect id="displaynone_rect" width="100%" height="100%" display="none" />
40 <rect id="rect" width="100%" height="100%" />
41 <use id="displaynone_use_rect" xlink:href="#displaynone_rect"/>
42
43 <!-- an empty mask where the basic shape element has display=none -->
44 <mask id="testMask1">
45 <rect width="100%" height="100%" display="none" fill="white" />
46 </mask>
47 <!-- an empty mask where display=none is inherited down to the basic shape -->
48 <mask id="testMask2">
49 <g display="none">
50 <rect width="100%" height="100%" fill="white" />
51 </g>
52 </mask>
53 <!-- an empty mask where the referenced element has display=none -->
54 <mask id="testMask3">
55 <use xlink:href="#displaynone_rect" fill="white"/>
56 </mask>
57 <!-- an empty mask by two levels of indirection -->
58 <mask id="testMask4">
59 <use xlink:href="#displaynone_use_rect" fill="white"/>
60 </mask>
61
62 <!-- an empty clip-path where the basic shape element has display=none -->
63 <clipPath id="testClip1">
64 <rect width="100%" height="100%" display="none" />
65 </clipPath>
66 <!-- an empty clip-path where the referenced element has display=none -->
67 <clipPath id="testClip2">
68 <use xlink:href="#displaynone_rect"/>
69 </clipPath>
70 <!-- an empty clip-path where the referencing element has display=none -->
71 <clipPath id="testClip3">
72 <use xlink:href="#rect" display="none"/>
73 </clipPath>
74 <!-- an empty clip-path by having both a display=none element and a non-rendered rect that's visible -->
75 <clipPath id="testClip4">
76 <rect width="100%" height="100%" display="none" />
77 <rect width="0" height="0"/>
78 </clipPath>
79 </defs>
80
81 <g id="reference" fill="lime" stroke="black">
82 <rect x="50" y="50" width="100" height="100"/>
83 <rect x="150" y="50" width="100" height="100"/>
84 <rect x="250" y="50" width="100" height="100"/>
85 <rect x="350" y="50" width="100" height="100"/>
86 <rect x="50" y="200" width="100" height="100"/>
87 <rect x="150" y="200" width="100" height="100"/>
88 <rect x="250" y="200" width="100" height="100"/>
89 <rect x="350" y="200" width="100" height="100"/>
90 </g>
91
92 <rect x="50" y="50" width="100" height="100" fill="red" mask="url(#testMask1)"/>
93 <rect x="150" y="50" width="100" height="100" fill="red" mask="url(#testMask2)"/>
94 <rect x="250" y="50" width="100" height="100" fill="red" mask="url(#testMask3)"/>
95 <rect x="350" y="50" width="100" height="100" fill="red" mask="url(#testMask4)"/>
96
97 <rect x="50" y="200" width="100" height="100" fill="red" clip-path="url(#testClip1)"/>
98 <rect x="150" y="200" width="100" height="100" fill="red" clip-path="url(#testClip2)"/>
99 <rect x="250" y="200" width="100" height="100" fill="red" clip-path="url(#testClip3)"/>
100 <rect x="350" y="200" width="100" height="100" fill="red" clip-path="url(#testClip4)"/>
101 </g>
102 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
103 <text id="revision" x="10" y="340" stroke="none"
104 fill="black">$Revision: 1.3 $</text>
105 </g>
106 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
107 <!-- comment out this watermark once the test is approved -->
108 <!--
109 <g id="draft-watermark">
110 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
111 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
112 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
113 </g>-->
114 </svg>