Source for file star.php

Documentation is available at star.php

  1. <?php
  2.  
  3.  require_once('../Graph.class.php');
  4.  Graph::importObject('Star');
  5.  
  6.  $graph = new Graph(200,200);
  7.  $graph->type = "gif";
  8.  $graph->transparent=true;
  9.  
  10.  $star = new Star(100);
  11.  $star->color = $graph->createColor(255,255,255);
  12.  $star->borderColor = $graph->createColor(0,0,255);
  13.  $star->numPoint = 7;
  14.  $star->lenPoint = 80;
  15.  $star->x = 100;
  16.  $star->y = 100;
  17.  
  18.  $star->type = 'gif';
  19.  $star->transparent = true;
  20.  
  21.  $graph->add($star);
  22.         
  23.  $star2 = new Star(50);
  24.  $star2->color = $graph->createColor(255,20,70);
  25.  $star2->borderColor = $graph->createColor(255,20,70);
  26.  $star2->numPoint = 5;
  27.  $star2->lenPoint = 60;
  28.  $star2->x = 100;
  29.  $star2->y = 100;
  30.  
  31.  $star2->type = 'gif';
  32.  $star2->transparent = true;
  33.         
  34.  $graph->add($star2);
  35.  
  36.  $star3 = new Star(20);
  37.  $star3->color = $graph->createColor(255,30,70);
  38.  $star3->borderColor = $graph->createColor(0,0,0);
  39.  $star3->numPoint = 8;
  40.  $star3->lenPoint = 10;
  41.  $star3->x = 25;
  42.  $star3->y = 25;
  43.  $star3->quality = 100;
  44.  $star3->type = 'gif';
  45.  $star3->transparent = true;
  46.         
  47.  $graph->add($star3);
  48.     
  49.  $star4 = new Star(20);
  50.  $star4->color = $graph->createColor(20,255,70);
  51.  $star4->borderColor = $graph->createColor(0,0,0);
  52.  $star4->numPoint = 8;
  53.  $star4->lenPoint = 10;
  54.  $star4->x = $graph->width - 25;
  55.  $star4->y = $graph->width - 25;
  56.  $star4->quality = 100;
  57.  $star4->type = 'gif';
  58.  $star4->transparent = true;
  59.         
  60.  $graph->add($star4);
  61.         
  62.         
  63.  $graph->flush();
  64. ?>

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