support crop with dynamic point

This commit is contained in:
Le_Tung 2017-09-08 16:03:14 +09:00
commit 3210b1d4fd

View file

@ -16,10 +16,15 @@ class Point
private $x; private $x;
private $y; private $y;
public function __construct($x, $y) public function __construct($x, $y, $dynamic = false)
{ {
$this->x = (int) $x; if ($dynamic) {
$this->y = (int) $y; $this->x = $x;
$this->y = $y;
} else {
$this->x = (int)$x;
$this->y = (int)$y;
}
} }
/** /**