Debian Codegraph @

test_non_regression/fail/filter/filters-displace-02-f.svg

raw
1 <svg version="1.1" baseProfile="full" 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="ED" author="CL" status="accepted"
15 version="$Revision: 1.9 $" testname="$RCSfile: filters-displace-02-f.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feDisplacementMapElement">
17 <p>
18 This tests feDisplacementMap without feImage. The input geometry is also used as the displacement map.
19 </p>
20 <p>
21 The bottom subtest tests that not specifying the 'xChannelSelector' attribute has the same effect as if 'A' was specified.
22 </p>
23 <p>
24 In both cases the filter input image consists of a gradient that is rendered using the default 'color-interpolation' which is 'sRGB'.
25 The default colorspace for filter primitives is 'linearRGB'. The filtering operation happens in 'linearRGB' space and the
26 result is then transformed back to 'sRGB' space for display.
27 </p>
28 </d:testDescription>
29 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
30 <p>
31 Run the test. No interaction required.
32 </p>
33 </d:operatorScript>
34 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
35 <p>
36 The test has passed if:
37 </p>
38 <ul>
39 <li>the top rectangle is overlapped by a gradient that has its blackest part centered around the vertical green line that splits the top rectangle</li>
40 <li>the bottom right corner of the area covered by the top gradient is aligned with the corner just below the top rectangle</li>
41 <li>the bottom rectangle is overlapped by a gradient that is displaced upwards with the maximum displacement the middle indicated by the vertical green line that splits the bottom rectangle</li>
42 <li>no part of the bottom gradient extends outside the bottom rectangle</li>
43 <li>both gradients use the same gradientcolors</li>
44 </ul>
45 </d:passCriteria>
46 </d:SVGTestCase>
47 <title id="test-title">$RCSfile: filters-displace-02-f.svg,v $</title>
48 <defs>
49 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
50 <font-face-src>
51 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
52 </font-face-src>
53 </font-face>
54 </defs>
55 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
56 <linearGradient id="fade" gradientUnits="objectBoundingBox">
57 <stop offset="0" stop-color="#600" stop-opacity="0"/>
58 <stop offset="0.5" stop-color="#000" stop-opacity="1"/>
59 <stop offset="1.0" stop-color="#300" stop-opacity="0"/>
60 </linearGradient>
61
62 <filter id="bend" filterUnits="objectBoundingBox" x="0" width="1.0" y="-1.3" height="2.28">
63 <feDisplacementMap in="SourceGraphic" in2="SourceAlpha" yChannelSelector="A" scale="30"/>
64 </filter>
65
66 <filter id="slide" filterUnits="objectBoundingBox" x="-0.3" width="1.3" y="0" height="1.3">
67 <feDisplacementMap in="SourceGraphic" in2="SourceGraphic" xChannelSelector="R" yChannelSelector="G" scale="80"/>
68 </filter>
69
70 <polyline points="280, 40, 280,120" stroke-width="2" stroke="green"/>
71 <polyline points="400, 144, 420,144, 420, 124" stroke-width="2" stroke="green" fill="none"/>
72 <rect width="360" height="80" x="60" y="40" fill="none" stroke="#933" stroke-width="2"/>
73 <rect width="360" height="80" x="60" y="40" fill="url(#fade)" filter="url(#slide)"/>
74
75 <polyline points="240, 180, 240,260" stroke-width="2" stroke="green"/>
76 <rect width="360" height="80" x="60" y="180" fill="none" stroke="#933" stroke-width="2"/>
77 <rect width="360" height="80" x="60" y="180" fill="url(#fade)" filter="url(#bend)"/>
78
79 </g>
80 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
81 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
82 </g>
83 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
84 <!-- comment out this watermark once the test is approved -->
85 <!--<g id="draft-watermark">
86 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
87 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
88 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
89 </g>-->
90 </svg>