Source for file text.php

Documentation is available at text.php

  1. <?php
  2.  
  3. require_once('../Graph.class.php');
  4.  
  5. $graph new Graph(200,200);
  6. $graph->type "gif";
  7. $graph->transparent=false;
  8. $graph->setBackground(2552550);
  9.  
  10. $text new Text("Hello World",14);
  11.  
  12. $text->color $graph->createColor(2550200);
  13. $text->setX($graph->width 2,1);
  14. $text->setY(0,0);
  15. $text->type "gif";
  16. $text->transparent=true;
  17.  
  18. $graph->add($text);
  19.         
  20. $text2 new Text("Hello PHP graph",14,20);
  21.  
  22. $text2->color $graph->createColor(30130200);
  23. $text2->setX($graph->width 2,1);
  24. $text2->setY(30,0);
  25. $text2->type "gif";
  26. $text2->transparent=true;
  27. $graph->add($text2);
  28.  
  29.  
  30. $text3 new Text("Hmmmm.... ",17,-40,'../fonts/arial.ttf');
  31. $text3->color $graph->createColor(30200,10);
  32. $text3->backGround $graph->createColor(2552550);
  33. $text3->setX($graph->width 2,1);
  34. $text3->setY(90,0);
  35. $text3->type "gif";
  36. $text3->transparent=true;        
  37. $graph->add($text3);
  38.         
  39. $text4 new Text("Keretes vagyok ",12,-40);
  40. $text4->color $graph->createColor(150200,10);
  41. $text4->borderColor $graph->createColor(255255255);
  42. $text4->setX(($graph->width 2)-40,1);
  43. $text4->setY(100,0);
  44. $text4->transparent=true;
  45. $text4->type "gif";     
  46.         
  47. $graph->add($text4);
  48.         
  49. $graph->flush();
  50. ?>

Documentation generated on Tue, 09 Feb 2010 01:17:52 +0100 by phpDocumentor 1.4.1