function pImage::setGraphArea

5.x pImage.class.php pImage::setGraphArea($X1, $Y1, $X2, $Y2)

File

inc/pchart/pchart/class/pImage.class.php, line 129

Class

pImage

Code

function setGraphArea($X1, $Y1, $X2, $Y2) 
 {
  if ($X2 < $X1 || $X1 == $X2 || $Y2 < $Y1 || $Y1 == $Y2) {
    return (-1);
  }

  $this->GraphAreaX1 = $X1;
  $this->DataSet->Data ["GraphArea"]["X1"] = $X1;
  $this->GraphAreaY1 = $Y1;
  $this->DataSet->Data ["GraphArea"]["Y1"] = $Y1;
  $this->GraphAreaX2 = $X2;
  $this->DataSet->Data ["GraphArea"]["X2"] = $X2;
  $this->GraphAreaY2 = $Y2;
  $this->DataSet->Data ["GraphArea"]["Y2"] = $Y2;
}