xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tkorm...@apache.org
Subject cvs commit: xml-batik/samples/tests/spec/scripting alert.svg
Date Fri, 02 Nov 2001 09:48:41 GMT
tkormann    01/11/02 01:48:41

  Added:       samples/tests/spec/scripting alert.svg
  Log:
  new test to illustrate mouse events
  
  Revision  Changes    Path
  1.1                  xml-batik/samples/tests/spec/scripting/alert.svg
  
  Index: alert.svg
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
  "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
  
  <!-- ========================================================================= -->
  <!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
  <!--                                                                           -->
  <!-- This software is published under the terms of the Apache Software License -->
  <!-- version 1.1, a copy of which has been included with this distribution in  -->
  <!-- the LICENSE file.                                                         -->
  <!-- ========================================================================= -->
  
  <!-- ========================================================================= -->
  <!-- Image element references an SVG file                                      -->
  <!--                                                                           -->
  <!-- @author Thierry.Kormann@sophia.inria.fr                                   -->
  <!-- @version $Id: alert.svg,v 1.1 2001/11/02 09:48:41 tkormann Exp $ -->
  <!-- ========================================================================= -->
  
  <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
  
  <svg width="450" height="500" viewBox="0 0 450 500">
  <title>Alert on mouse events</title>
  
  <defs>
  	<script type="text/ecmascript">
  
  	function showDialog(msg) {
  		alert(msg);
  	}
  
  	</script>
  </defs>
  
      <!-- ============================================================= -->
      <!-- Test content                                                  -->
      <!-- ============================================================= -->
      <g id="testContent">
          <text x="225" y="30" class="title">Alert on mouse events</text>
      </g>
  
  
  	<!-- ########## board ############ -->
  	<g style="stroke:black">
  		<g>
  			<rect x="50" y="60" width="350" height="20" style="fill:#eee"/>
  			<rect x="50" y="80" width="350" height="60" style="fill:none"/>
  		</g>
  		<g transform="translate(0 80)">
  			<rect x="50" y="60" width="350" height="20" style="fill:#eee"/>
  			<rect x="50" y="80" width="350" height="60" style="fill:none"/>
  		</g>
  		<g transform="translate(0 160)">
  			<rect x="50" y="60" width="350" height="20" style="fill:#eee"/>
  			<rect x="50" y="80" width="350" height="60" style="fill:none"/>
  		</g>
  		<line x1="225" y1="60" x2="225" y2="300" />
  	</g>
  	<g style="fill:black; stroke:none; text-anchor:middle; font-size:14">
  		<g>
  			<text x="137.5" y="75">mousedown</text>
  			<text x="312.5" y="75">mouseup</text>
  		</g>
  		<g transform="translate(0 80)">
  			<text x="137.5" y="75">mouseover</text>
  			<text x="312.5" y="75">mouseout</text>
  		</g>
  		<g transform="translate(0 160)">
  			<text x="137.5" y="75">mousemove</text>
  			<text x="312.5" y="75">onclick</text>
  		</g>
  	</g>
  
  	<!-- ########## content ############ -->
  	<g>
  		<circle cx="137.5" cy="110" r="20" style="fill:crimson" onmousedown="showDialog('onmousedown')"/>
  		<circle cx="312.5" cy="110" r="20" style="fill:crimson" onmouseup="showDialog('onmouseup')"/>
  	</g>
  	<g transform="translate(0 80)">
  		<circle cx="137.5" cy="110" r="20" style="fill:crimson" onmouseover="showDialog('onmouseover')"/>
  		<circle cx="312.5" cy="110" r="20" style="fill:crimson" onmouseout="showDialog('onmouseout')"/>
  	</g>
  	<g transform="translate(0 160)">
  		<circle cx="137.5" cy="110" r="20" style="fill:crimson" onmousemove="showDialog('onmousemove')"/>
  		<circle cx="312.5" cy="110" r="20" style="fill:crimson" onclick="showDialog('onclick')"/>
  	</g>
  
  
      <!-- ============================================================= -->
      <!-- Batik sample mark                                             -->
      <!-- ============================================================= -->
      <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
      
  </svg>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


Mime
View raw message