You are here

protected function PositionedRectangle::translatePoint in Image Effects 8

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

Translates a point by an offset.

Parameters

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

array $offset: Offset array (x, y).

Return value

$this

1 call to PositionedRectangle::translatePoint()
PositionedRectangle::translate in src/Component/PositionedRectangle.php
Translates the rectangle and any additional point.

File

src/Component/PositionedRectangle.php, line 308

Class

PositionedRectangle
Rectangle algebra class.

Namespace

Drupal\image_effects\Component

Code

protected function translatePoint(array &$point, array $offset) {
  $point[0] += $offset[0];
  $point[1] += $offset[1];
  return $this;
}