Debian Codegraph @

test_non_regression/svg/masking-path-08-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="CM" author="ED" status="accepted"
13 version="$Revision: 1.7 $" testname="$RCSfile: masking-path-08-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 a few 'clip-path' cases to see that clipping paths are applied and constructed properly.
17 </p>
18 </d:testDescription>
19 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
20 <p>
21 Run the test. No interaction required.
22 </p>
23 </d:operatorScript>
24 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
25 <p>
26 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.
27 </p>
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-08-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 <clipPath id="emptyclip">
51 </clipPath>
52 <clipPath id="hiddenclip">
53 <rect width="100" height="100" visibility="hidden"/>
54 </clipPath>
55 <clipPath id="displayclip">
56 <rect width="100" height="100" display="none"/>
57 </clipPath>
58 <clipPath id="opacityclip">
59 <rect width="100" height="100" opacity="0"/>
60 </clipPath>
61 <clipPath id="strokefillclip">
62 <rect width="100" height="100" stroke="none" fill="none"/>
63 </clipPath>
64 <clipPath id="strokewidthclip">
65 <rect x="40" y="40" width="20" height="20" stroke="black" stroke-width="80"/>
66 </clipPath>
67 <clipPath id="strokeopacityclip">
68 <rect x="40" y="40" width="20" height="20" stroke="black" stroke-opacity="0" stroke-width="80"/>
69 </clipPath>
70 <clipPath id="fillopacityclip">
71 <rect width="100" height="100" fill-opacity="0"/>
72 </clipPath>
73 </defs>
74
75 <text x="240" y="50" text-anchor="middle">Establishing a new clipping path</text>
76
77 <g transform="scale(0.5) translate(320 200)">
78 <rect width="100" height="100" fill="lime"/>
79 <rect width="100" height="100" fill="red" clip-path="url(#emptyclip)"/>
80
81 <g transform="translate(110 0)">
82 <rect width="100" height="100" fill="lime"/>
83 <rect width="100" height="100" fill="red" clip-path="url(#hiddenclip)"/>
84 </g>
85
86 <g transform="translate(220 0)">
87 <rect width="100" height="100" fill="lime"/>
88 <rect width="100" height="100" fill="red" clip-path="url(#displayclip)"/>
89 </g>
90
91 <!-- This has an intentionally broken clip-path url -->
92 <g transform="translate(0 110)">
93 <rect x="0.5" y="0.5" width="99" height="99" fill="red"/>
94 <rect width="100" height="100" fill="lime" clip-path="url(#unknown)"/>
95 </g>
96
97 <g transform="translate(110 110)">
98 <rect x="0.5" y="0.5" width="99" height="99" fill="red"/>
99 <rect width="100" height="100" fill="lime" clip-path="url(#opacityclip)"/>
100 </g>
101
102 <g transform="translate(220 110)">
103 <rect x="0.5" y="0.5" width="99" height="99" fill="red"/>
104 <rect width="100" height="100" fill="lime" clip-path="url(#strokefillclip)"/>
105 </g>
106
107 <g transform="translate(0 220)">
108 <rect width="100" height="100" fill="lime"/>
109 <rect width="100" height="100" fill="red" clip-path="url(#strokewidthclip)"/>
110 <rect x="39" y="39" width="22" height="22" fill="lime"/>
111 </g>
112
113 <g transform="translate(110 220)">
114 <rect width="100" height="100" fill="lime"/>
115 <rect width="100" height="100" fill="red" clip-path="url(#strokeopacityclip)"/>
116 <rect x="39" y="39" width="22" height="22" fill="lime"/>
117 </g>
118
119 <g transform="translate(220 220)">
120 <rect x="0.5" y="0.5" width="99" height="99" fill="red"/>
121 <rect width="100" height="100" fill="lime" clip-path="url(#fillopacityclip)"/>
122 </g>
123
124 <rect width="320" height="320" fill="none" stroke="black"/>
125 </g>
126
127
128 </g>
129 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
130 <text id="revision" x="10" y="340" stroke="none"
131 fill="black">$Revision: 1.7 $</text>
132 </g>
133 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
134 <!-- comment out this watermark once the test is approved --><!--
135 <g id="draft-watermark">
136 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
137 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
138 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
139 </g>-->
140 </svg>