| 19 | 
  * Include the phphtmllib libraries | 
  * Include the phphtmllib libraries | 
| 20 | 
  */ | 
  */ | 
| 21 | 
 include_once("includes.inc"); | 
 include_once("includes.inc"); | 
| 22 | 
 include_once($phphtmllib."/widgets/SVGDocumentClass.inc"); | 
 include_once($phphtmllib."/widgets/svg/SVGDocumentClass.inc"); | 
| 23 | 
  | 
  | 
| 24 | 
 //build the SVG Document object and set the | 
 //build the SVG Document object and set the | 
| 25 | 
 //width=400, height=200 attributes on the 'svg' root | 
 //width=400, height=200 attributes on the 'svg' root | 
| 42 | 
 $circle = svg_circle(0,0,50,"blue", "black", 2); | 
 $circle = svg_circle(0,0,50,"blue", "black", 2); | 
| 43 | 
  | 
  | 
| 44 | 
 //add a neat mouseover to the circle | 
 //add a neat mouseover to the circle | 
| 45 | 
 $circle->set_tag_attribute("onmouseover=\"evt.target.setAttribute('style', 'stroke:red; stroke-width:2');\""); | 
 $circle->set_tag_attribute("onmouseover", "evt.target.setAttribute('style', 'stroke:red; stroke-width:2');"); | 
| 46 | 
 $circle->set_tag_attribute("onmouseout=\"evt.target.setAttribute('style', '');\""); | 
 $circle->set_tag_attribute("onmouseout", "evt.target.setAttribute('style', '');"); | 
| 47 | 
 $g->add( $circle ); | 
 $g->add( $circle ); | 
| 48 | 
 //add it to the image | 
 //add it to the image | 
| 49 | 
 $svgdoc->add( $g ); | 
 $svgdoc->add( $g ); | 
| 50 | 
  | 
  | 
| 51 | 
 $g2 = svg_g("", "translate(100 80)"); | 
 $g2 = svg_g("stroke:black", "translate(100 80)"); | 
| 52 | 
 $text = svg_text(0,80,NULL,NULL, "SVG built by"); | 
 $text = svg_text(0,80,NULL,NULL, "SVG built by"); | 
| 53 | 
 $text->set_style("font-size:20;"); | 
 $text->set_style("font-size:20;"); | 
| 54 | 
  | 
 $text->set_collapse(); | 
| 55 | 
 $linktext = svg_text(114,80,NULL,"mylink","phpHtmlLib"); | 
 $linktext = svg_text(114,80,NULL,"mylink","phpHtmlLib"); | 
| 56 | 
  | 
  | 
| 57 | 
 //$linktext->set_style("font-size:20;color:#FF0000;text-decoration:underline;"); | 
 //$linktext->set_style("font-size:20;color:#FF0000;text-decoration:underline;"); |