當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Shape::IndentedRectangle方法代碼示例

本文整理匯總了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);
開發者ID:nourchene-benslimane,項目名稱:rth_backup,代碼行數:31,代碼來源:canvas_jpgarchex.php

示例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();
?>

開發者ID:Artea,項目名稱:freebeer,代碼行數:29,代碼來源:canvasex06.php


注:本文中的Shape::IndentedRectangle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。