support crop with dynamic point
This commit is contained in:
parent
96225b2dff
commit
3210b1d4fd
1 changed files with 8 additions and 3 deletions
|
|
@ -16,10 +16,15 @@ class Point
|
|||
private $x;
|
||||
private $y;
|
||||
|
||||
public function __construct($x, $y)
|
||||
public function __construct($x, $y, $dynamic = false)
|
||||
{
|
||||
$this->x = (int) $x;
|
||||
$this->y = (int) $y;
|
||||
if ($dynamic) {
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
} else {
|
||||
$this->x = (int)$x;
|
||||
$this->y = (int)$y;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue