Debian Codegraph @

test_non_regression/fail/mask/masking-path-10-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.3" reviewer="SVGWG" author="ED" status="accepted"
13 version="$Revision: 1.4 $" testname="$RCSfile: masking-path-10-b.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#Masking">
15 <p>
16 This tests a few 'mask' cases to see that masks are applied and constructed properly.
17 </p>
18 <p>
19 There are nine subtests in this test. There should be a big stroked rectangle with nine smaller rectangles inside. If all of the smaller rectangles are green the test has passed.
20 </p>
21 </d:testDescription>
22 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
23 <p>
24 Run the test. No interaction required.
25 </p>
26 </d:operatorScript>
27 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
28 <p>
29 The test has passed if:
30 </p>
31 <ul>
32 <li>There is no red visible.</li>
33 <li>Each of the nine small rectangles are green.</li>
34 </ul>
35 </d:passCriteria>
36 </d:SVGTestCase>
37 <title id="test-title">$RCSfile: masking-path-10-b.svg,v $</title>
38 <defs>
39 <font-face
40 font-family="SVGFreeSansASCII"
41 unicode-range="U+0-7F">
42 <font-face-src>
43 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
44 </font-face-src>
45 </font-face>
46 </defs>
47 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
48
49 <defs>
50 <mask id="emptymask"/>
51 <mask id="hiddenmask">
52 <rect width="100" height="100" visibility="hidden"/>
53 </mask>
54 <mask id="displaymask">
55 <rect width="100" height="100" display="none"/>
56 </mask>
57 <mask id="opacitymask">
58 <rect width="100" height="100" opacity="0"/>
59 </mask>
60 <mask id="strokefillmask">
61 <rect width="100" height="100" stroke="none" fill="none"/>
62 </mask>
63 <mask id="strokewidthmask">
64 <rect x="40" y="40" width="20" height="20" stroke="white" stroke-width="20"/>
65 </mask>
66 <mask id="strokeopacitymask">
67 <rect x="40" y="40" width="20" height="20" stroke="white" stroke-opacity="0" stroke-width="20"/>
68 </mask>
69 <mask id="fillopacitymask">
70 <rect width="100" height="100" fill-opacity="0"/>
71 </mask>
72 </defs>
73
74 <text x="240" y="50" text-anchor="middle">Establishing a new masking path</text>
75
76 <g transform="scale(0.5) translate(320 200)">
77 <rect width="100" height="100" fill="lime"/>
78 <rect width="100" height="100" fill="red" mask="url(#emptymask)"/>
79
80 <g transform="translate(110 0)">
81 <rect width="100" height="100" fill="lime"/>
82 <rect width="100" height="100" fill="red" mask="url(#hiddenmask)"/>
83 </g>
84
85 <g transform="translate(220 0)">
86 <rect width="100" height="100" fill="lime"/>
87 <rect width="100" height="100" fill="red" mask="url(#displaymask)"/>
88 </g>
89
90 <!-- This has an intentionally broken mask url -->
91 <g transform="translate(0 110)">
92 <rect x="0.5" y="0.5" width="99" height="99" fill="red"/>
93 <rect width="100" height="100" fill="lime" mask="url(#unknown)"/>
94 </g>
95
96 <g transform="translate(110 110)">
97 <rect x="0.5" y="0.5" width="99" height="99" fill="lime"/>
98 <rect width="100" height="100" fill="red" mask="url(#opacitymask)"/>
99 </g>
100
101 <g transform="translate(220 110)">
102 <rect x="0.5" y="0.5" width="99" height="99" fill="lime"/>
103 <rect width="100" height="100" fill="red" mask="url(#strokefillmask)"/>
104 </g>
105
106 <g transform="translate(0 220)">
107 <rect width="100" height="100" fill="lime"/>
108 <rect width="100" height="100" fill="red" mask="url(#strokewidthmask)"/>
109 <rect x="29" y="29" width="42" height="42" fill="lime"/>
110 </g>
111
112 <g transform="translate(110 220)">
113 <rect width="100" height="100" fill="lime"/>
114 <rect width="100" height="100" fill="red" mask="url(#strokeopacitymask)"/>
115 </g>
116
117 <g transform="translate(220 220)">
118 <rect x="0.5" y="0.5" width="99" height="99" fill="lime"/>
119 <rect width="100" height="100" fill="red" mask="url(#fillopacitymask)"/>
120 </g>
121
122 <rect width="320" height="320" fill="none" stroke="black"/>
123 </g>
124
125
126 </g>
127 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
128 <text id="revision" x="10" y="340" stroke="none"
129 fill="black">$Revision: 1.4 $</text>
130 </g>
131 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
132 <!-- comment out this watermark once the test is approved -->
133 <!--<g id="draft-watermark">
134 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
135 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
136 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
137 </g>-->
138 </svg>