Debian Codegraph @

test_non_regression/fail/filter/filters-image-03-f.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="TB" author="ED" status="accepted"
13 version="$Revision: 1.3 $" testname="$RCSfile: filters-image-03-f.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feImageElement">
15 <p>
16 This tests the feImage element with a number of different filter primitive subregion values.
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 The test is passed if:
27 </p>
28 <ul>
29 <li>the first row show four smiley faces of the same size, each framed by a blue rectangle</li>
30 <li>the first image on the left on the second row shows half a smiley face (horizontally offset)</li>
31 <li>the second image on the left on the second row shows half a smiley face (vertically offset)</li>
32 <li>the third image on the left on the second row shows the upper-lefthand quarter of the smiley face enlarged to fit the blue rectangle</li>
33 <li>the rightmost image on the second row shows the upper-lefthand quarter of the smiley face (horizontally and vertically offset)</li>
34 </ul>
35 </d:passCriteria>
36 </d:SVGTestCase>
37 <title id="test-title">$RCSfile: filters-image-03-f.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 <defs>
49 <!-- A breakdown of this testcase:
50
51 All filters:
52 filterUnits not specified, defaults to objectBoundingBox.
53 x=0, y=0, width=1, height=1 -> filter region = bounding box.
54
55 viewport is viewbox which is 0 0 480 360
56 primitiveUnits not specified, defaults to userSpaceOnUse
57 preserveAspectRatio defaults to xMidYMid meet
58
59 Top row
60 1. Default:
61 x defaults to 0% relative to filter region (special case)
62 y defaults to 0% relative to filter region (special case)
63 width defaults to 100% of filter region (special case)
64 height defaults to 100% of filter region (special case)
65
66 2. All specified relative
67 x = 20.8% = 100/480 (0.2083)
68 y = 0% = 0/360 (0.0)
69 width = 10.4% = 50/480 (0.1042)
70 height = 13.8% = 50/360 (0.1388)
71
72 3. All specified absolute
73 x = 200
74 y = 0
75 width = 50
76 height = 50
77
78 4. y Specified
79 x defaults to 0% relative to filter region (special case)
80 y = 0% = 0/360
81 width defaults to 100% of filter region (special case)
82 height defaults to 100% of filter region (special case)
83
84 Bottom row
85 1. Width specified
86 x defaults to 0% relative to filter region (special case)
87 y defaults to 0% relative to filter region (special case)
88 width 20.4% 97.92/480 **** Should be 20.8%
89 height defaults to 100% of filter region (special case)
90
91 2. Height specified
92 x defaults to 0% relative to filter region (special case)
93 y defaults to 0% relative to filter region (special case)
94 width defaults to 100% of filter region (special case)
95 height 27.6% 99.36/360
96
97 3. Width and height specified
98 x defaults to 0% relative to filter region (special case)
99 y defaults to 0% relative to filter region (special case)
100 width 20.8% 99.8/480 (x2)
101 height 27.6% 99.36/360 (x2)
102
103 4. x, y specified
104 x = 67.7% = 325.0
105 y = 34.6% = 125.0
106 width defaults to 100% of filter region (special case)
107 height defaults to 100% of filter region (special case)
108 -->
109 <filter id="default" x="0" y="0" width="1" height="1">
110 <feImage xlink:href="../images/smiley.png"/>
111 </filter>
112 <filter id="all_specified_relative" x="0" y="0" width="1" height="1">
113 <!-- x=100/480 y=0/360 width=50/480 height=50/360-->
114 <feImage x="20.8%" y="0%" width="10.4%" height="13.8%"
115 xlink:href="../images/smiley.png"/>
116 </filter>
117 <filter id="all_specified_absolute" x="0" y="0" width="1" height="1">
118 <feImage x="200" y="0" height="50" width="50"
119 xlink:href="../images/smiley.png"/>
120 </filter>
121 <filter id="y_specified" x="0" y="0" width="1" height="1">
122 <feImage y="0%"
123 xlink:href="../images/smiley.png"/>
124 </filter>
125 <filter id="width_specified" x="0" y="0" width="1" height="1">
126 <feImage width="20.8%"
127 xlink:href="../images/smiley.png"/>
128 </filter>
129 <filter id="height_specified" x="0" y="0" width="1" height="1">
130 <feImage height="27.6%"
131 xlink:href="../images/smiley.png"/>
132 </filter>
133 <filter id="width_height_specified" x="0" y="0" width="1" height="1">
134 <feImage width="20.8%" height="27.6%"
135 xlink:href="../images/smiley.png"/>
136 </filter>
137 <filter id="x_y_specified" x="0" y="0" width="1" height="1">
138 <feImage x="67.7%" y="34.6%"
139 xlink:href="../images/smiley.png"/>
140 </filter>
141 </defs>
142
143 <g transform="translate(60 100)">
144 <rect fill="red" width="50" height="50" filter="url(#default)"/>
145 <rect fill="red" x="100" width="50" height="50" filter="url(#all_specified_relative)"/>
146 <rect fill="red" x="200" width="50" height="50" filter="url(#all_specified_absolute)"/>
147 <rect fill="red" x="300" width="50" height="50" filter="url(#y_specified)"/>
148
149 <rect fill="red" y="100" width="50" height="50" filter="url(#width_specified)"/>
150 <rect fill="red" x="100" y="100" width="50" height="50" filter="url(#height_specified)"/>
151 <rect fill="red" x="200" y="100" width="50" height="50" filter="url(#width_height_specified)"/>
152 <rect fill="red" x="300" y="100" width="50" height="50" filter="url(#x_y_specified)"/>
153
154 <g id="reference_frames" stroke="blue" stroke-width="1" fill="none">
155 <rect width="50" height="50" />
156 <rect x="100" width="50" height="50"/>
157 <rect x="200" width="50" height="50"/>
158 <rect x="300" width="50" height="50"/>
159 <rect y="100" width="50" height="50"/>
160 <rect x="100" y="100" width="50" height="50"/>
161 <rect x="200" y="100" width="50" height="50"/>
162 <rect x="300" y="100" width="50" height="50"/>
163 </g>
164 </g>
165 </g>
166 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
167 <text id="revision" x="10" y="340" stroke="none"
168 fill="black">$Revision: 1.3 $</text>
169 </g>
170 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
171 <!-- comment out this watermark once the test is approved -->
172 <!--
173 <g id="draft-watermark">
174 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
175 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
176 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
177 </g>
178 -->
179 </svg>