forked from halo-battle/game
Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
24
artichow/examples/pattern-002.php
Normal file
24
artichow/examples/pattern-002.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
require_once "../Pattern.class.php";
|
||||
require_once "../Graph.class.php";
|
||||
|
||||
$graph = new Graph(300, 200);
|
||||
|
||||
$graph->title->set('Customized pattern 1');
|
||||
$graph->title->setFont(new Tuffy(12));
|
||||
|
||||
$pattern = Pattern::get('BarDepth');
|
||||
$pattern->setArgs(array(
|
||||
'yForeground' => array(5, 3, 4, 7, 6, 5, 8, 4, 7, NULL, NULL),
|
||||
'yBackground' => array(NULL, NULL, 4, 5, 6, 4, 2, 3, 7, 5, 4),
|
||||
'colorForeground' => new Color(230, 230, 230),
|
||||
'colorBackground' => new Color(250, 90, 90)
|
||||
));
|
||||
|
||||
$group = $pattern->create();
|
||||
$group->legend->setPosition(0.5, 0.78);
|
||||
|
||||
$graph->add($group);
|
||||
$graph->draw();
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue