public function valid( $x, $y )
    {
        return ($x > 0 && $x < $this->getWidth() && $y > 0 && $y < $this->getHeight());
    }
public function valid( $x, $y )
    {
        return ($x > 0 && $x < $this->getWidth() && $y > 0 && $y < $this->getHeight());
    }
public function valid ( $ x , $ y ) { return ( $ x > 0 && $ x < $ this -> getWidth ( ) && $ y > 0 && $ y < $ this -> getHeight ( ) ) ; }
Returns true if pos is a valid coordinate pair within the image;
otherwise returns false.

@param int $x
@param int $y
@return boolean
Returns true if pos is a valid coordinate pair within the image ; otherwise returns false .