Lines Matching defs:coordinates
19 * @param array $coordinates Array with top left coordinate as first and bottom right coordinate as second element
21 public function __construct(string $key, array $coordinates)
23 $this->addCoordinates($key, $coordinates);
27 * Add coordinates.
29 * @param array $coordinates Array with top left coordinate as first and bottom right coordinate as second element
31 * @throws InvalidException If $coordinates doesn't have two elements
35 public function addCoordinates(string $key, array $coordinates): self
37 if (!isset($coordinates[0], $coordinates[1])) {
38 throw new InvalidException('expected $coordinates to be an array with two elements');
42 'top_left' => $coordinates[0],
43 'bottom_right' => $coordinates[1],