forked from halo-battle/game
Version 1.12
This commit is contained in:
parent
2a066a7498
commit
de31cd3e9a
1373 changed files with 156282 additions and 45238 deletions
37
onyx2/include/jpgraph/Examples/canvasex01.php
Normal file
37
onyx2/include/jpgraph/Examples/canvasex01.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
// $Id: canvasex01.php,v 1.3 2002/10/23 08:17:23 aditus Exp $
|
||||
include "../jpgraph.php";
|
||||
include "../jpgraph_canvas.php";
|
||||
|
||||
// Setup a basic canvas we can work
|
||||
$g = new CanvasGraph(400,300,'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();
|
||||
|
||||
// Draw a text box in the middle
|
||||
$txt="This\nis\na TEXT!!!";
|
||||
$t = new Text($txt,200,10);
|
||||
$t->SetFont(FF_ARIAL,FS_BOLD,40);
|
||||
|
||||
// How should the text box interpret the coordinates?
|
||||
$t->Align('center','top');
|
||||
|
||||
// How should the paragraph be aligned?
|
||||
$t->ParagraphAlign('center');
|
||||
|
||||
// Add a box around the text, white fill, black border and gray shadow
|
||||
$t->SetBox("white","black","gray");
|
||||
|
||||
// Stroke the text
|
||||
$t->Stroke($g->img);
|
||||
|
||||
// Stroke the graph
|
||||
$g->Stroke();
|
||||
|
||||
?>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue