summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/import/filters-turb-02-f-manual.svg
blob: 779bacc77610c01d53646f71cd7abf3cc4743c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<svg id="svg-root" width="100%" height="100%"
  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <!--======================================================================-->
  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
  <!--=  Institute of Technology, European Research Consortium for         =-->
  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
  <!--=  All Rights Reserved.                                              =-->
  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
  <!--======================================================================-->
  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
    template-version="1.3" reviewer="CM" author="ED" status="accepted"
    version="$Revision: 1.7 $" testname="$RCSfile: filters-turb-02-f.svg,v $">
    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feTurbulenceSeedAttribute">
        <p>
          This tests the <a>'seed'</a> attribute on <a>'feTurbulence'</a>.
        </p>
    </d:testDescription>
    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
      <p>
          Run the test. No interaction required.
        
      </p>
    </d:operatorScript>
    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
      <p>You should see three rectangles with black stroke. In each of these rectangles there should be
      a series of numbers indicating the value for <a>'seed'</a> that was used on the small rectangle
        directly above the number. The top stroked rectangle should contain 7 smaller rects that all
        have a different filter applied to them, the lower two rectangles should contain 2 smaller rects
        each. The filtered rectangles in each stroked rectangle should all look exactly the same.
        If the filtered rectangles are red, that indicates that the test has failed.
      </p>
      <p>
        The test has passed if:
      </p>
      <ul>
        <li>the top stroked rectangle contains 7 smaller rectangles that are all identical</li>
        <li>the lower left stroked rectangle contains 2 smaller rectangles that are identical</li>
        <li>the lower right stroked rectangle contains 2 smaller rectangles that are identical</li>
        <li>there's no red visible inside the stroked rectangles</li>
      </ul>
    </d:passCriteria>
  </d:SVGTestCase>
  <title id="test-title">$RCSfile: filters-turb-02-f.svg,v $</title>
  <defs>
    <font-face
      font-family="SVGFreeSansASCII"
      unicode-range="U+0-7F">
      <font-face-src>
        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
      </font-face-src>
    </font-face>
  </defs>
  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
    <defs>
      <!-- test negative values, these two should be same as seed="0" and seed="1" -->
      <filter id="turbneg1" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="-0.2" baseFrequency="0.01" type="turbulence"/>
      </filter>
      <filter id="turbneg2" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="-0.5" baseFrequency="0.01" type="turbulence"/>
      </filter>      
      <filter id="turbneg3" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="-0.8" baseFrequency="0.01" type="turbulence"/>
      </filter>
      
      <!-- the reference for seed="0" -->
      <filter id="turbzero" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="0" baseFrequency="0.01" type="turbulence"/>
      </filter>
      
      <!-- seed="0" is transformed by the setup_seed method to be equal to seed="1" --> 
      <filter id="turbpos1" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="0.2" baseFrequency="0.01" type="turbulence"/>
      </filter>
      <filter id="turbpos2" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="0.5" baseFrequency="0.01" type="turbulence"/>
      </filter>
      <filter id="turbpos3" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="1.5" baseFrequency="0.01" type="turbulence"/>
      </filter>

      <!-- These should be the same -->
      <filter id="turbneg4" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="-1" baseFrequency="0.01" type="turbulence"/>
      </filter>
      <filter id="turbneg5" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="-1.5" baseFrequency="0.01" type="turbulence"/>
      </filter>
      
      <!-- These should be the same -->
      <filter id="turbneg6" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="-2" baseFrequency="0.01" type="turbulence"/>
      </filter>
      <filter id="turbneg7" x="0" y="0" width="100%" height="100%">
        <feTurbulence seed="-2.6" baseFrequency="0.01" type="turbulence"/>
      </filter>
            
      <style type="text/css">
        #subtests text { fill: black }
      </style>
    </defs>
    
    <text x="50%" y="2em" style="font-size:24px; text-anchor:middle">feTurbulence seed</text>
    
    <g id="subtests" transform="translate(65 80)" text-anchor="middle" fill="red">
      <rect width="50" height="50" filter="url(#turbneg3)"/>
      <text x="25" y="80">-0.8</text>
      <rect width="50" height="50" filter="url(#turbneg2)" transform="translate(50 0)"/>
      <text x="75" y="80">-0.5</text>
      <rect width="50" height="50" filter="url(#turbneg1)" transform="translate(100 0)"/>
      <text x="125" y="80">-0.2</text>
      <rect width="50" height="50" filter="url(#turbzero)" transform="translate(150 0)"/>
      <text x="175" y="80">0</text>
      <rect width="50" height="50" filter="url(#turbpos1)" transform="translate(200 0)"/>
      <text x="225" y="80">0.2</text>
      <rect width="50" height="50" filter="url(#turbpos2)" transform="translate(250 0)"/>
      <text x="275" y="80">0.5</text>
      <rect width="50" height="50" filter="url(#turbpos3)" transform="translate(300 0)"/>
      <text x="325" y="80">1.5</text>
      <rect x="-5" y="-5" width="360" height="100" stroke="black" fill="none"/>
      
      <rect width="50" height="50" filter="url(#turbneg4)" transform="translate(0 120)"/>
      <text x="25" y="200">-1</text>
      <rect width="50" height="50" filter="url(#turbneg5)" transform="translate(50 120)"/>
      <text x="75" y="200">-1.5</text>
      <rect x="-5" y="115" width="110" height="100" stroke="black" fill="none"/>
      
      <rect width="50" height="50" filter="url(#turbneg6)" transform="translate(250 120)"/>
      <text x="275" y="200">-2</text>
      <rect width="50" height="50" filter="url(#turbneg7)" transform="translate(300 120)"/>
      <text x="325" y="200">-2.6</text>
      <rect x="245" y="115" width="110" height="100" stroke="black" fill="none"/>
    </g>
  </g>
  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
    <text id="revision" x="10" y="340" stroke="none"
      fill="black">$Revision: 1.7 $</text>
  </g>
  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
  <!-- comment out this watermark once the test is approved --><!--
  <g id="draft-watermark">
    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
  </g>-->
</svg>