Lines Matching refs:ratio
57 $ratio = $this->getRequestedAspectRatio();
58 $url->addQueryParameterIfNotPresent(Dimension::RATIO_ATTRIBUTE, $ratio);
167 throw new ExceptionBadArgument("The requested ratio ($requestedRatio) is not a valid value ({$e->getMessage()})", FetcherImage::CANONICAL, 0, $e);
189 * This is needed to calculate the {@link MediaLink::getTargetRatio() target ratio}
197 * The Aspect ratio as explained here
215 * The Aspect ratio of the target image (may be the original or the an image scaled down)
234 * Return the requested aspect ratio requested
238 * The Aspect ratio as explained here
266 * Giving width and height, check that the aspect ratio is the same
285 LogUtility::msg("Unable to check the target ratio because it returns this error: {$e->getMessage()}");
304 LogUtility::msg("Internal Error: The width ($width) and height ($height) calculated for the image ($this) does not pass the ratio test. They have a ratio of ($imgTagRatio) while the target dimension ratio is ($targetRatio)");
316 * * with `200`, the target image has a {@link FetcherTraitImage::getTargetWidth() logical width} of 200 and a {@link FetcherTraitImage::getTargetHeight() logical height} that is scaled down by the {@link FetcherTraitImage::getIntrinsicAspectRatio() instrinsic ratio}
317 * * with ''0x20'', the target image has a {@link FetcherTraitImage::getTargetHeight() logical height} of 20 and a {@link FetcherTraitImage::getTargetWidth() logical width} that is scaled down by the {@link FetcherTraitImage::getIntrinsicAspectRatio() instrinsic ratio}
339 $ratio = $this->getCalculatedRequestedAspectRatioAsFloat();
341 $ratio = $this->getIntrinsicAspectRatio();
343 return self::round($width / $ratio);
350 * Scaled down by ratio
353 $ratio = $this->getCalculatedRequestedAspectRatioAsFloat();
354 [$croppedWidth, $croppedHeight] = $this->getCroppingDimensionsWithRatio($ratio);
357 // no requested aspect ratio
368 * * with `200`, the target image has a {@link FetcherTraitImage::getTargetWidth() logical width} of 200 and a {@link FetcherTraitImage::getTargetHeight() logical height} that is scaled down by the {@link FetcherTraitImage::getIntrinsicAspectRatio() instrinsic ratio}
369 * * with ''0x20'', the target image has a {@link FetcherTraitImage::getTargetHeight() logical height} of 20 and a {@link FetcherTraitImage::getTargetWidth() logical width} that is scaled down by the {@link FetcherTraitImage::getIntrinsicAspectRatio() instrinsic ratio}
389 $ratio = $this->getCalculatedRequestedAspectRatioAsFloat();
391 $ratio = $this->getIntrinsicAspectRatio();
393 return self::round($ratio * $height);
403 $ratio = $this->getCalculatedRequestedAspectRatioAsFloat();
404 [$logicalWidthWithRatio, $logicalHeightWithRatio] = $this->getCroppingDimensionsWithRatio($ratio);
407 // no ratio requested
467 * after applying a ratio (16x9, 4x3, ..)
551 throw new ExceptionNotFound("No ratio was specified");