本文整理汇总了PHP中Shape::IndentedRectangle方法的典型用法代码示例。如果您正苦于以下问题:PHP Shape::IndentedRectangle方法的具体用法?PHP Shape::IndentedRectangle怎么用?PHP Shape::IndentedRectangle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shape
的用法示例。
在下文中一共展示了Shape::IndentedRectangle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// 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);
示例2: CanvasGraph
// $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();
?>