summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/svg-feflood-001.html
blob: 4588cf93f6ca52386ce8af1dbe6e0462572bb559 (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
<!DOCTYPE html>
<html>
<head>
    <title>Filter Effects Test: feFlood in filter for SVG rect element</title>
    <link rel="author" title="Dirk Schulze" href="mailto:dschulze@adobe.com">
    <link rel="help" href="http://www.w3.org/TR/filter-effects-1/#feFloodElement">
    <link rel="match" href="reference/svg-feflood-ref.html">
    <meta name="flags" content="svg">
    <meta name="assert" content="The red rect gets filtered with the filter primitve feFlood. feFlood fills the rect with green. - The rect is black to avoid color interpolation issues.">
    <style type="text/css">
    svg {
        width: 500px;
        height: 500px;
    }
    </style>
</head>
<body>
    <p>The test passes if you see a black square and no red.</p>
    <svg>
        <defs>
          <filter id="filter" x="0" y="0" width="1" height="1">
            <feFlood flood-color="black"/>
          </filter>
        </defs>
        <rect width="300" height="300" fill="red" filter="url(#filter)"/>
    </svg>
</body>
</html>