/**
* 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;
}