Debian Codegraph @

test_non_regression/fail/na/interaction/interact-pevents-07-t.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="DOH" author="AE" status="accepted"
13 version="$Revision: 1.3 $" testname="$RCSfile: interact-pevents-07-t.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty">
15 <p>Testing pointer-events and rendering order</p>
16 </d:testDescription>
17 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
18 <p>
19 Move the mouse over the blue and purple shapes. Click the red circle on the top left. Move the mouse over the blue and purple shapes again.
20 </p>
21 </d:operatorScript>
22 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
23 <p>
24 For the test to pass the blue rectangles must always turn red on mouseover, and the ovals must turn red on mouseover only if pointer-events are set to "ALL".
25 If a shape other than the one currently hovered turns red then the test has failed.
26 </p>
27 </d:passCriteria>
28 </d:SVGTestCase>
29 <title id="test-title">$RCSfile: interact-pevents-07-t.svg,v $</title>
30 <defs>
31 <font-face
32 font-family="SVGFreeSansASCII"
33 unicode-range="U+0-7F">
34 <font-face-src>
35 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
36 </font-face-src>
37 </font-face>
38 </defs>
39 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
40 <script><![CDATA[
41 function changeFill(id, fill)
42 {
43 document.getElementById(id).setAttribute("fill", fill);
44 }
45
46 function changePointerEvents(value)
47 {
48 if ('on' == value)
49 {
50 document.getElementById('all').setAttribute("visibility", 'visible');
51 document.getElementById('none').setAttribute("visibility", 'hidden');
52 document.getElementById('on').setAttribute("stroke-width", '3');
53 document.getElementById('off').setAttribute("stroke-width", '1');
54 document.getElementById('c10').setAttribute("pointer-events", 'all');
55 document.getElementById('c11').setAttribute("pointer-events", 'all');
56 document.getElementById('c12').setAttribute("pointer-events", 'all');
57 }
58 else
59 {
60 document.getElementById('all').setAttribute("visibility", 'hidden');
61 document.getElementById('none').setAttribute("visibility", 'visible');
62 document.getElementById('on').setAttribute("stroke-width", '1');
63 document.getElementById('off').setAttribute("stroke-width", '3');
64 document.getElementById('c10').setAttribute("pointer-events", 'none');
65 document.getElementById('c11').setAttribute("pointer-events", 'none');
66 document.getElementById('c12').setAttribute("pointer-events", 'none');
67 }
68
69 }
70 ]]></script>
71 <rect x="15" y="15" height="280" width="450" fill="none" stroke="black" stroke-width="0.25"/>
72 <g text-anchor="middle">
73 <text x="240" y="30" fill="black" font-size="15">Testing pointer-events and rendering order</text>
74 <text x="240" y="42" fill="#555" font-size="10">Rectangles should turn RED on mouseover </text>
75 <text x="240" y="54" fill="#555" font-size="10">Ovals should turn RED if Pointer-Events are set to "ALL"</text>
76 </g>
77 <g id="buttons">
78 <g text-anchor="middle" font-size="8" fill="#555" transform="translate(0,10)">
79 <text x="400" y="85">Change "Pointer-Events" of </text>
80 <text x="400" y="95">ovals from "ALL" to "NONE"</text>
81 <circle id="on" cx="385" cy="65" r="10" fill-opacity="1" fill="#3c5" stroke="black" stroke-width="3" onmousedown="changePointerEvents('on')" />
82 <circle id="off" cx="415" cy="65" r="10" fill-opacity="1" fill="#f35" stroke="black" onmousedown="changePointerEvents('off')" />
83 </g>
84 <g text-anchor="middle" font-size="12" fill="#555">
85 <text id="all" x="240" y="285" fill="#555" visibility="visible" >Purple ovals have "Pointer-Events" set to "ALL".</text>
86 <text id="none" x="240" y="285" fill="#555" visibility="hidden">Purple ovals have Pointer-Events set to "NONE".</text>
87 </g>
88 </g>
89 <g transform="scale(0.75, 0.5) translate(100, 85)">
90 <circle id="c10" cx="160" cy="350" r="100" fill-opacity="1" fill="#53f" stroke="black" pointer-events="all" onmouseover="changeFill('c10', '#F55')" onmouseout="changeFill('c10', '#53F')" />
91 <rect id="r10" x="10" y="50" width="300" height="300" fill-opacity="1" fill="#35f" stroke="black" onmouseover="changeFill('r10', '#F55')" onmouseout="changeFill('r10', '#35F')" />
92 <circle id="c11" cx="310" cy="350" r="90" fill-opacity="1" fill="#75f" stroke="black" pointer-events="all" onmouseover="changeFill('c11', '#F55')" onmouseout="changeFill('c11', '#75f')" />
93 <rect id="r11" x="60" y="100" width="200" height="200" fill-opacity="1" fill="#57f" stroke="black" onmouseover="changeFill('r11', '#F55')" onmouseout="changeFill('r11', '#57f')" />
94 <circle id="c12" cx="310" cy="200" r="75" fill-opacity="1" fill="#97f" stroke="black" pointer-events="all" onmouseover="changeFill('c12', '#F55')" onmouseout="changeFill('c12', '#97f')" />
95 <rect id="r12" x="110" y="150" width="100" height="100" fill-opacity="1" fill="#79f" stroke="black" onmouseover="changeFill('r12', '#F55')" onmouseout="changeFill('r12', '#79F')" />
96 <g id="dasharray-rectangles" stroke-width="0.5" stroke-dasharray="4, 4">
97 <rect id="r-dash10" x="10" y="50" width="300" height="300" fill-opacity="0" fill="none" stroke="black" pointer-events="none"/>
98 <rect id="r-dash11" x="60" y="100" width="200" height="200" fill-opacity="0" fill="none" stroke="black" pointer-events="none"/>
99 <rect id="r-dash12" x="110" y="150" width="100" height="100" fill-opacity="0" fill="none" stroke="black" pointer-events="none"/>
100 </g>
101 </g>
102 </g>
103 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
104 <text id="revision" x="10" y="340" stroke="none"
105 fill="black">$Revision: 1.3 $</text>
106 </g>
107 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
108 <!-- comment out this watermark once the test is approved
109 <g id="draft-watermark">
110 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
111 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
112 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
113 </g>-->
114 </svg>