adapter() public method

Get the graph graphic adapter
public adapter ( ) : mixed
return mixed
 /**
  * Method to calculate which quadrant a point is in.
  *
  * @param  array $point
  * @param  array $center
  * @return int
  */
 protected function getQuadrant($point, $center)
 {
     $quad = 0;
     if ($this->graph->adapter() instanceof \Pop\Pdf\Pdf) {
         if ($point['x'] >= $center['x']) {
             $quad = $point['y'] >= $center['y'] ? 4 : 1;
         } else {
             $quad = $point['y'] >= $center['y'] ? 3 : 2;
         }
     } else {
         if ($point['x'] >= $center['x']) {
             $quad = $point['y'] <= $center['y'] ? 4 : 1;
         } else {
             $quad = $point['y'] <= $center['y'] ? 3 : 2;
         }
     }
     return $quad;
 }
Example #2
0
 public function testAdapter()
 {
     $g = new Graph($this->imageOptions, Graph::FORCE_GD);
     $this->assertInstanceOf('Pop\\Image\\Gd', $g->adapter());
 }