Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
37
artichow/examples/test/multi-line-text.php
Normal file
37
artichow/examples/test/multi-line-text.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
require_once "../../Graph.class.php";
|
||||
|
||||
$graph = new Graph(400, 600);
|
||||
|
||||
$driver = $graph->getDriver();
|
||||
|
||||
$driver->filledRectangle(
|
||||
new Red,
|
||||
new Line(
|
||||
new Point(200, 0),
|
||||
new Point(200, 600)
|
||||
)
|
||||
);
|
||||
|
||||
$text = new Text(
|
||||
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean gravida quam semper nibh. Sed orci. Aenean ullamcorper magna eget odio. Sed nonummy ante sit amet sapien.\nPhasellus nulla dui, aliquet vel, adipiscing vel, vulputate sed, velit.\nSed at neque vel ipsum commodo hendrerit.\nA. Nonyme",
|
||||
new Tuffy(mt_rand(10, 15)),
|
||||
new Color(mt_rand(0, 100), mt_rand(0, 100), mt_rand(0, 100)),
|
||||
0
|
||||
);
|
||||
|
||||
$driver->string($text, new Point(0, 0), 200);
|
||||
|
||||
$text = new Text(
|
||||
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean gravida quam semper nibh. Sed orci. Aenean ullamcorper magna eget odio. Sed nonummy ante sit amet sapien.\nPhasellus nulla dui, aliquet vel, adipiscing vel, vulputate sed, velit.\nSed at neque vel ipsum commodo hendrerit.\nA. Nonyme",
|
||||
new Font(mt_rand(2, 4)),
|
||||
new Color(mt_rand(0, 100), mt_rand(0, 100), mt_rand(0, 100)),
|
||||
0
|
||||
);
|
||||
|
||||
$driver->string($text, new Point(0, 400), 200);
|
||||
|
||||
$graph->draw();
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue