Debian Codegraph @

test_non_regression/svg/masking-opacity-01-b.svg

raw
1 <svg version="1.1" baseProfile="basic" id="svg-root"
2 width="100%" height="100%" viewBox="0 0 480 360"
3 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= SVG 1.1 2nd Edition Test Case =-->
6 <!--======================================================================-->
7 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
8 <!--= Institute of Technology, European Research Consortium for =-->
9 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
10 <!--= All Rights Reserved. =-->
11 <!--= See http://www.w3.org/Consortium/Legal/. =-->
12 <!--======================================================================-->
13 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
14 template-version="1.4" reviewer="SVGWG" author="Haroon Sheikh" status="accepted"
15 version="$Revision: 1.6 $" testname="$RCSfile: masking-opacity-01-b.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#ObjectAndGroupOpacityProperties">
17 <p>
18 Test to see the effect of applying an opacity property to a group.
19 </p>
20 <p>
21 A blue rectangle with a green rectangle on top are contained in a
22 group. This opacity of the group and the opacity of the rectangles are
23 changed in this test. A red rectangle is provided in the background so
24 that opacity changes are obvious visually.
25 </p>
26 <p>
27 From top to bottom, the tests are as follows.
28 </p>
29 <p>
30 In the top test, the opacities of the group and the individual rectangles are
31 all set to 1.
32 </p>
33 <p>
34 In the second test, the group is given an opacity of 0.5.
35 </p>
36 <p>
37 In the third test, the group maintains a group opacity of 1 whereas each individual
38 rectangle is given an opacity of 0.5 in the group.
39 </p>
40 <p>
41 Lastly, the group and individual rectangles are all given an opacity of 0.5.
42 </p>
43
44
45 </d:testDescription>
46 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
47 <p>
48 Run the test. No interaction required.
49 </p>
50 </d:operatorScript>
51 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
52 <p>
53 In the top test, the green rectangle should appear on top of the blue
54 rectangle.
55 </p>
56 <p>
57 In the second test, the blue
58 rectangle should not show through in the region where the green and blue overlap.
59 </p>
60 <p>
61 In the third test, the blue rectangle
62 should show through in the overlap region.
63 </p>
64 <p>
65 Lastly, the
66 result should be similar to the previous test only fainter (because the opacity) is
67 resulting in less contribution.
68 </p>
69 <p>
70 The rendered picture should match the reference image exactly, except for possible
71 variations in the labelling text (per CSS2 rules).
72 </p>
73 </d:passCriteria>
74 </d:SVGTestCase>
75 <title id="test-title">$RCSfile: masking-opacity-01-b.svg,v $</title>
76 <defs>
77 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
78 <font-face-src>
79 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
80 </font-face-src>
81 </font-face>
82 </defs>
83 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
84 <text font-size="24" x="50" y="27">Test for opacity property on a group.</text>
85 <rect x="10" y="30" width="100" height="260" fill="red"/>
86 <g opacity="1">
87 <rect x="60" y="50" width="80" height="40" fill="blue"/>
88 <rect x="70" y="60" width="80" height="40" fill="lime"/>
89 </g>
90 <text font-size="20" x="200" y="62">Group opacity: 1</text>
91 <text font-size="20" x="200" y="80">Blue rectangle opacity: 1</text>
92 <text font-size="20" x="200" y="98">Green rectangle opacity: 1</text>
93 <g opacity="0.5">
94 <rect x="60" y="110" width="80" height="40" fill="blue"/>
95 <rect x="70" y="120" width="80" height="40" fill="lime"/>
96 </g>
97 <text font-size="20" x="200" y="122">Group opacity: 0.5</text>
98 <text font-size="20" x="200" y="140">Blue rectangle opacity: 1</text>
99 <text font-size="20" x="200" y="158">Green rectangle opacity: 1</text>
100 <g opacity="1">
101 <rect x="60" y="170" width="80" height="40" fill="blue" opacity=".5"/>
102 <rect x="70" y="180" width="80" height="40" fill="lime" opacity=".5"/>
103 </g>
104 <text font-size="20" x="200" y="182">Group opacity: 1</text>
105 <text font-size="20" x="200" y="200">Blue rectangle opacity: 0.5</text>
106 <text font-size="20" x="200" y="218">Green rectangle opacity: 0.5</text>
107 <g opacity="0.5">
108 <rect x="60" y="230" width="80" height="40" fill="blue" opacity=".5"/>
109 <rect x="70" y="240" width="80" height="40" fill="lime" opacity=".5"/>
110 </g>
111 <text font-size="20" x="200" y="242">Group opacity: 0.5</text>
112 <text font-size="20" x="200" y="260">Blue rectangle opacity: 0.5</text>
113 <text font-size="20" x="200" y="278">Green rectangle opacity: 0.5</text>
114 </g>
115 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
116 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
117 </g>
118 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
119 <!-- comment out this watermark once the test is approved -->
120 <!--<g id="draft-watermark">
121 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
122 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
123 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
124 </g>-->
125 </svg>