You are here

public function PositionedRectangle::setPoint in Image Effects 8.3

Same name and namespace in other branches
  1. 8 src/Component/PositionedRectangle.php \Drupal\image_effects\Component\PositionedRectangle::setPoint()
  2. 8.2 src/Component/PositionedRectangle.php \Drupal\image_effects\Component\PositionedRectangle::setPoint()

Sets a point and its coordinates.

Parameters

string $id: The point ID.

array $coords: An array of x, y coordinates.

Return value

$this

1 call to PositionedRectangle::setPoint()
PositionedRectangle::addGrid in src/Component/PositionedRectangle.php
Add points representing a grid within the rectangle.

File

src/Component/PositionedRectangle.php, line 219

Class

PositionedRectangle
Rectangle algebra class.

Namespace

Drupal\image_effects\Component

Code

public function setPoint($id, array $coords = [
  0,
  0,
]) {
  $this->points[$id] = $coords;
  return $this;
}