summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/filters/fePointLight-zoomed-page.svg
blob: 9bd24878cd3ccf65629c459a20b4f6f505052de3 (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
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<!--
     This test verifies that fePointLight stays in the right place when the user
     zooms the page.

     If the test passes, you should see a green box with its center illuminated
     by a point light. If the test fails, the illumination will be off-center.

     This test checks that SVG filters transform points in user space to points
     in filter space correctly.

     The root SVG element specifies a width and height to prevent scrollbars
     from appearing when the page is zoomed.
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
     reftest-zoom="2.0" width="100" height="100">
    <defs>
        <filter id="illuminate-center">
            <feDiffuseLighting in="SourceGraphic" result="light" lighting-color="white">
                <fePointLight x="50" y="50" z="50"/>
            </feDiffuseLighting>
            <feComposite in="SourceGraphic" in2="light" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"/>
        </filter>
    </defs>
    <rect width="100" height="100" fill="green" filter="url(#illuminate-center)"/>
</svg>