| 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="SVGWG" author="Chris Lilley" status="accepted" |
| 15 |
version="$Revision: 1.5 $" testname="$RCSfile: interact-cursor-01-f.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/interact.html#Cursors"> |
| 17 |
<p> |
| 18 |
Purpose of test is to determine if the cursor property and cursor element are |
| 19 |
supported. |
| 20 |
</p> |
| 21 |
</d:testDescription> |
| 22 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 23 |
<p> |
| 24 |
This test requires user interaction. Firstly, the default cursor behaviour should be examined. |
| 25 |
Move the cursor to the top left corner, in the white area. This is the default |
| 26 |
cursor. Now move the cursor over the text at the top of the example. The cursor |
| 27 |
changes to the text cursor. Lastly, move the cursor to the blue link |
| 28 |
text - the cursor changes to the pointer cursor. |
| 29 |
</p> |
| 30 |
<p> |
| 31 |
Now, move the cursor in turn to each of the gray rectangles (but not on top |
| 32 |
of the white text label text). From top to bottom in the first row, the cursor |
| 33 |
should change to: |
| 34 |
</p> |
| 35 |
<p> |
| 36 |
A crosshair or other 'accurate positioning' cursor |
| 37 |
The 'default' cursor, as noted above |
| 38 |
The 'pointer' cursor, as noted above |
| 39 |
A cursor indicating movement, such as panning |
| 40 |
</p> |
| 41 |
<p>Now from top to bottom in the second row, the cursor should change to: </p> |
| 42 |
<p> |
| 43 |
The 'text' cursor, as noted above |
| 44 |
A 'wait' cursor |
| 45 |
A 'help' cursor |
| 46 |
A special cursor which looks like a small magnifying glass. This is a downloaded image cursor. |
| 47 |
|
| 48 |
</p> |
| 49 |
<p> |
| 50 |
Moving to the bottom-leftmost of the eight red triangles, and moving around them clockwise, the |
| 51 |
cursor should change to: |
| 52 |
</p> |
| 53 |
<p> |
| 54 |
SouthEast-resize, South-resize, SouthWest resize, West-resize, |
| 55 |
NorthWest-resize, North-resize, NorthEast-resize, East-resize. |
| 56 |
</p> |
| 57 |
<p> |
| 58 |
Lastly, move the cursor to the target in the bottom-right of the test. The cursor must not |
| 59 |
change to the 'pointer' cursor, but instead to the custom magnifying glass cursor as noted |
| 60 |
above. |
| 61 |
</p> |
| 62 |
</d:operatorScript> |
| 63 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 64 |
<p> |
| 65 |
The test is passed if, at each position, the cursor changes as described in the operator script. |
| 66 |
</p> |
| 67 |
</d:passCriteria> |
| 68 |
</d:SVGTestCase> |
| 69 |
<title id="test-title">$RCSfile: interact-cursor-01-f.svg,v $</title> |
| 70 |
<defs> |
| 71 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 72 |
<font-face-src> |
| 73 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 74 |
</font-face-src> |
| 75 |
</font-face> |
| 76 |
</defs> |
| 77 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 78 |
<defs> |
| 79 |
<cursor id="magglass" xlink:href="../images/magnify.png" x="10" y="11"/> |
| 80 |
</defs> |
| 81 |
<text x="240" y="25" text-anchor="middle" font-size="26"> |
| 82 |
Text Cursor |
| 83 |
<a xlink:href="http://www.w3.org/TR/SVG/interact#Cursors" fill="blue" xlink:show="new">Pointer Cursor</a> |
| 84 |
</text> |
| 85 |
<!-- use this text to check the native 'text' and 'pointer' cursor --> |
| 86 |
<rect x="120" y="40" width="240" height="236" stroke="#666" stroke-width="3" fill="none"/> |
| 87 |
<!-- ====================================================================== --> |
| 88 |
<!-- Predefined keyword values for cursors ===================== --> |
| 89 |
<!-- ====================================================================== --> |
| 90 |
<g class="button"> |
| 91 |
<g cursor="crosshair"> |
| 92 |
<rect stroke="none" fill="#666" x="148" y="70" width="80" height="32"/> |
| 93 |
<text stroke="none" fill="#FFF" font-family="Geneva, Arial, Helvetica, sans-serif" font-weight="bold" font-size="16" x="154" y="90">crosshair</text> |
| 94 |
</g> |
| 95 |
<g cursor="default"> |
| 96 |
<rect stroke="none" fill="#666" x="148" y="118" width="80" height="32"/> |
| 97 |
<text stroke="none" fill="#FFF" font-family="Geneva, Arial, Helvetica, sans-serif" font-weight="bold" font-size="16" x="154" y="138">default</text> |
| 98 |
</g> |
| 99 |
<g cursor="pointer"> |
| 100 |
<rect stroke="none" fill="#666" x="148" y="166" width="80" height="32"/> |
| 101 |
<text stroke="none" fill="#FFF" font-family="Geneva, Arial, Helvetica, sans-serif" font-weight="bold" font-size="16" x="154" y="186">pointer</text> |
| 102 |
</g> |
| 103 |
<g cursor="move"> |
| 104 |
<rect stroke="none" fill="#666" x="148" y="214" width="80" height="32"/> |
| 105 |
<text stroke="none" fill="#FFF" font-family="Geneva, Arial, Helvetica, sans-serif" font-weight="bold" font-size="16" x="154" y="235">move</text> |
| 106 |
</g> |
| 107 |
<g cursor="text"> |
| 108 |
<rect stroke="none" fill="#666" x="252" y="70" width="80" height="32"/> |
| 109 |
<text stroke="none" fill="#FFF" font-family="Geneva, Arial, Helvetica, sans-serif" font-weight="bold" font-size="16" x="258" y="90">text</text> |
| 110 |
</g> |
| 111 |
<g cursor="wait"> |
| 112 |
<rect stroke="none" fill="#666" x="252" y="118" width="80" height="32"/> |
| 113 |
<text stroke="none" fill="#FFF" font-family="Geneva, Arial, Helvetica, sans-serif" font-weight="bold" font-size="16" x="258" y="138">wait</text> |
| 114 |
</g> |
| 115 |
<g cursor="help"> |
| 116 |
<rect stroke="none" fill="#666" x="252" y="166" width="80" height="32"/> |
| 117 |
<text stroke="none" fill="#FFF" font-family="Geneva, Arial, Helvetica, sans-serif" font-weight="bold" font-size="16" x="258" y="186">help</text> |
| 118 |
</g> |
| 119 |
<g cursor="url(#magglass),crosshair"> |
| 120 |
<rect stroke="none" fill="#666" x="252" y="214" width="80" height="32"/> |
| 121 |
<text stroke="none" fill="#FFF" font-family="Geneva, Arial, Helvetica, sans-serif" font-weight="bold" font-size="16" x="258" y="235"><url></text> |
| 122 |
</g> |
| 123 |
</g> |
| 124 |
<g stroke="black" stroke-width="1" fill="#900"> |
| 125 |
<polygon points="116,36 116,68 148,36" cursor="nw-resize"/> |
| 126 |
<polygon points="364,36 364,68 332,36" cursor="ne-resize"/> |
| 127 |
<polygon points="364,280 332,280 364,248" cursor="se-resize"/> |
| 128 |
<polygon points="116,280 148,280 116,248" cursor="sw-resize"/> |
| 129 |
<polygon points="340,134 340,182 364,158" cursor="e-resize"/> |
| 130 |
<polygon points="116,158 140,134 140,182" cursor="w-resize"/> |
| 131 |
<polygon points="240,36 264,63.3 214,63.3" cursor="n-resize"/> |
| 132 |
<polygon points="240,280 264,252.7 214,252.7" cursor="s-resize"/> |
| 133 |
</g> |
| 134 |
<!-- link to check consistency of 'pointer' cursor --> |
| 135 |
<!-- target for hotspot test --> |
| 136 |
<g id="target" stroke-width="1" stroke="black" cursor="url(#magglass),crosshair"> |
| 137 |
<!-- make a target to test the hotspot --> |
| 138 |
<circle cx="390" cy="315" r="16" stroke="none" fill="#FFC"/> |
| 139 |
<polyline points="390,295 390,335"/> |
| 140 |
<polyline points="370,315 410,315"/> |
| 141 |
<circle cx="390" cy="315" r="6" stroke="none" fill="#FFF"/> |
| 142 |
<!-- make the hotspot, taking care the cursor stays the same --> |
| 143 |
<a fill="blue" xlink:href="http://www.w3.org/Icons/w3c_home"> |
| 144 |
<circle cx="390" cy="315" r="2" stroke="none" fill="#000"/> |
| 145 |
</a> |
| 146 |
</g> |
| 147 |
</g> |
| 148 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 149 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text> |
| 150 |
</g> |
| 151 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 152 |
<!-- comment out this watermark once the test is approved --> |
| 153 |
<!--<g id="draft-watermark"> |
| 154 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 155 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 156 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 157 |
</g>--> |
| 158 |
</svg> |