You are here

public function PositionedRectangle::__construct in Image Effects 8.3

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

Constructs a new PositionedRectangle object.

Parameters

int $width: (Optional) The width of the rectangle.

int $height: (Optional) The height of the rectangle.

File

src/Component/PositionedRectangle.php, line 75

Class

PositionedRectangle
Rectangle algebra class.

Namespace

Drupal\image_effects\Component

Code

public function __construct($width = 0, $height = 0) {
  if ($width !== 0 && $height !== 0) {
    $this
      ->setFromDimensions($width, $height);
  }
}