Example #1
0
 function drawDataPoint($image, $x, $y)
 {
     if (DEBUG) {
         print "Drawing data point for {$image} at [{$x}, {$y}] in {$color}.\n";
     }
     $points = polygon_points(array('x' => $x, 'y' => $y), $this->vertices, $this->radius);
     //var_dump(count($points));
     if (DEBUG) {
         var_dump($points);
     }
     if (DEBUG) {
         var_dump($this->vertices);
     }
     imagefilledpolygon($image, $points, $this->vertices, $this->color[0]);
     if (!empty($this->color[1])) {
         imagepolygon($image, $points, $this->vertices, $this->color[1]);
     }
 }
Example #2
0
 function drawDataPoint($image, $x, $y)
 {
     $this->labelcolor = $this->color[2];
     if (DEBUG) {
         print "Drawing data point for {$image} at [{$x}, {$y}].\n";
     }
     $points = polygon_points(array('x' => $x, 'y' => $y), $this->vertices, $this->radius);
     //var_dump(count($points));
     if (DEBUG) {
         var_dump($points);
     }
     if (DEBUG) {
         var_dump($this->vertices);
     }
     imagefilledpolygon($image, $points, $this->vertices, $this->color[0]);
     if ($this->lastPoint) {
         if (DEBUG) {
             print "Drawing data line for {$image} at [{$x}, {$y}].\n";
         }
         imageline($image, $this->lastPoint['x'], $this->lastPoint['y'], $x, $y, $this->color[1]);
     }
     $this->lastPoint = array('x' => $x, 'y' => $y);
 }