You are here

public function AutomatedCropInterface::setAspectRatio in Automated Crop 8

Set the aspect ratio from plugin object.

If the plugin configuration is set to `NaN` or not respect the pattern of, aspect ratio (W:H) we will calculate if from the original sizes of image. You should be sure to prevent this case to avoid potential, destructive crop.

Return value

self The plugin object with aspect_ratio property set.

1 method overrides AutomatedCropInterface::setAspectRatio()
AbstractAutomatedCrop::setAspectRatio in src/AbstractAutomatedCrop.php
Set the aspect ratio from plugin object.

File

src/AutomatedCropInterface.php, line 32

Class

AutomatedCropInterface
Provides an interface defining the AutomatedCrop plugin objects.

Namespace

Drupal\automated_crop

Code

public function setAspectRatio();