Location: PHPKode > scripts > splx_graph > test.php
<?php
require_once ("splx_graph.php");
$G = new splx_draw("red");
//draw grid --->
for ( $i = 0;$i <= 200;$i += 10 )
{
	$color = "#dadada";
	if ( $i % 50 == 0 )
		$color = "#808080";
	if ( $i % 100 == 0 )
		$color = "#da6060";
	$G->line(0,$i,200,$i,"$color");
	$G->line($i,0,$i,200,"$color");
}
//draw grid ---<
//draw lines---
$G->line(10,10,200,200,"yellow");
$G->line(0,200,80,10,"blue");
//set default color
$G->setcolor("red");
$G->moveto(1,1);
$G->lineto(10,15);
$G->lineto(20,5);
$G->lineto(30,70);
$G->lineto(40,50);
$G->lineto(90,10);
$G->lineto(200,30);
$G->setcolor("green");
$G->moveto(1,200);
$G->lineto(10,16);
$G->lineto(20,50);
$G->lineto(30,7);
$G->lineto(40,70);
$G->lineto(90,12);
$G->lineto(180,160);
$G->lineto(200,5);
//draw circle 80 px radius
$G->circle(100,100,80,"yellow");
//draw circle 50 px radius
$G->circle(100,100,50,"blue");
?>
Return current item: splx_graph