<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Example 13-4. A simple demonstration of using the JavaScript Vector Graphics Library</title>
<script type="text/javascript" src="../js/wz_jsgraphics.js"> </script>
<script type="text/javascript">
//<![CDATA[
/*
* This creates an instance of the object that will draw directly
* to the document
*/
var vgDoc = new jsGraphics();
vgDoc.setColor('#00ff00');
vgDoc.fillEllipse(100, 200, 100, 180);
vgDoc.setColor('#cc0000');
vgDoc.setStroke(3);
vgDoc.drawPolyline([50, 10, 120], [10, 50, 70]);
/* Do the actual drawing of the shapes to the screen */
vgDoc.paint();
//]]>
</script>
</head>
<body>
<h1>Vector Graphics JavaScript Library</h1>
</body>
</html>