// Now start drawing the arch overview from the bottom and up // This is all pretty manual and one day I will write a proper // framework to make it easy to construct these types of architecture // overviews. But for now, just plain old coordinates.. // Line: GD Library and image libraries $h = 3; $s = 3; $d = $l + $width - 9; $t->SetFillColor('cadetblue3'); $t->Set("TTF", $d, $r + 2, $s, 1); $t->Stroke($g->img, $scale); $t->Set("PNG", $d + $s, $r + 2, $s, 1); $t->Stroke($g->img, $scale); $t->Set("JPEG", $d + 2 * $s, $r + 2, $s, 1); $t->Stroke($g->img, $scale); $shape->IndentedRectangle($l, $r, $width, $h, $s * 3, 1, 2, 'lightgreen'); $tt->Set("GD Basic library\n(1.8.x or 2.x)", $l, $r, $width, $h - 1); $tt->Stroke($g->img, $scale); // Area: Basic internal JpGraph architecture $t->SetFillColor('goldenrod1'); $h = 2; $r -= $h; $d = 8; $t->Set("Image primitives\n(RGB, Anti-aliasing,\nGD Abstraction)", $l, $r - 0.5, $width * 0.5, $h + 0.5); $t->Stroke($g->img, $scale); $t->Set("Image Cache &\nStreaming", $l + 0.5 * $width, $r, $width * 0.4, $h); $t->Stroke($g->img, $scale); $r -= $h; $d = 8; $t->Set("2D Rot & Transformation", $l, $r, $width * 0.5, $h - 0.5); $t->Stroke($g->img, $scale);
// $Id$ include "../jpgraph.php"; include "../jpgraph_canvas.php"; include "../jpgraph_canvtools.php"; // Define work space $xmax = 40; $ymax = 40; // Setup a basic canvas we can work $g = new CanvasGraph(400, 200, 'auto'); $g->SetMargin(5, 11, 6, 11); $g->SetShadow(); $g->SetMarginColor("teal"); // We need to stroke the plotarea and margin before we add the // text since we otherwise would overwrite the text. $g->InitFrame(); // Create a new scale $scale = new CanvasScale($g); $scale->Set(0, $xmax, 0, $ymax); // The shape class is wrapper around the Imgae class which translates // the coordinates for us $shape = new Shape($g, $scale); $shape->SetColor('black'); $shape->IndentedRectangle(1, 2, 15, 15, 8, 8, CORNER_TOPLEFT, 'khaki'); $shape->IndentedRectangle(1, 20, 15, 15, 8, 8, CORNER_BOTTOMLEFT, 'khaki'); $shape->IndentedRectangle(20, 2, 15, 15, 8, 8, CORNER_TOPRIGHT, 'khaki'); $shape->IndentedRectangle(20, 20, 15, 15, 8, 8, CORNER_BOTTOMRIGHT, 'khaki'); // Stroke the graph $g->Stroke(); ?>