<?php
$Id: canvasex03.php,v 1.1 2002/08/27 20:08:57 aditus Exp $
include "jpgraph/jpgraph.php";
include "jpgraph/jpgraph_canvas.php";
include "jpgraph/jpgraph_canvtools.php";
$xmax=20;
$ymax=20;
$g = new CanvasGraph(400,200,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");
$g->InitFrame();
$scale = new CanvasScale($g);
$scale->Set(0,$xmax,0,$ymax);
$shape = new Shape($g,$scale);
$shape->SetColor('black');
$shape->SetColor('black');
$shape->Line(0,0,20,20);
$shape->Circle(5,14,2);
$shape->SetColor('red');
$shape->FilledCircle(11,8,3);
$shape->SetColor('green');
$shape->FilledRectangle(15,8,19,14);
$shape->SetColor('green');
$shape->FilledRoundedRectangle(2,3,8,6);
$shape->SetColor('darkgreen');
$shape->RoundedRectangle(2,3,8,6);
$g->Stroke();
?> |