You are here

protected function AutomatedCropDefault::calculateUnknownValue in Automated Crop 8

Calculate the new value of given width or height respecting homothety.

Parameters

int $value: Value to convert with image delta to found compatible new sizes.

Return value

int The new height or width respect the homothety of image.

1 call to AutomatedCropDefault::calculateUnknownValue()
AutomatedCropDefault::calculateCropBoxSize in src/Plugin/AutomatedCrop/AutomatedCropDefault.php
Calculation of the dimensions of the crop area.

File

src/Plugin/AutomatedCrop/AutomatedCropDefault.php, line 117

Class

AutomatedCropDefault
Class Generic routing entity mapper.

Namespace

Drupal\automated_crop\Plugin\AutomatedCrop

Code

protected function calculateUnknownValue($value) {
  return round($value * $this->delta);
}