1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-02 18:32:56 +02:00

Added change requests from @olivervogel

This commit is contained in:
gammalogic
2024-06-08 18:36:30 +01:00
committed by Oliver Vogel
parent 216f4cffb4
commit 56a92c7144
2 changed files with 4 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ class DrawBezierModifier extends ModifiersDrawBezierModifier implements Speciali
* @param float $t * @param float $t
* @return array{'x': float, 'y': float} * @return array{'x': float, 'y': float}
*/ */
public function calculateQuadraticBezierInterpolationPoint(float $t = 0.05): array private function calculateQuadraticBezierInterpolationPoint(float $t = 0.05): array
{ {
$remainder = 1 - $t; $remainder = 1 - $t;
$control_point_1_multiplier = $remainder * $remainder; $control_point_1_multiplier = $remainder * $remainder;
@@ -112,7 +112,7 @@ class DrawBezierModifier extends ModifiersDrawBezierModifier implements Speciali
* @param float $t * @param float $t
* @return array{'x': float, 'y': float} * @return array{'x': float, 'y': float}
*/ */
public function calculateCubicBezierInterpolationPoint(float $t = 0.05): array private function calculateCubicBezierInterpolationPoint(float $t = 0.05): array
{ {
$remainder = 1 - $t; $remainder = 1 - $t;
$t_squared = $t * $t; $t_squared = $t * $t;
@@ -144,7 +144,7 @@ class DrawBezierModifier extends ModifiersDrawBezierModifier implements Speciali
* @throws GeometryException * @throws GeometryException
* @return array{0: array<mixed>, 1: array<mixed>} * @return array{0: array<mixed>, 1: array<mixed>}
*/ */
public function calculateBezierPoints(): array private function calculateBezierPoints(): array
{ {
if ($this->drawable->count() !== 3 && $this->drawable->count() !== 4) { if ($this->drawable->count() !== 3 && $this->drawable->count() !== 4) {
throw new GeometryException('You must specify either 3 or 4 points to create a bezier curve'); throw new GeometryException('You must specify either 3 or 4 points to create a bezier curve');

View File

@@ -752,7 +752,7 @@ interface ImageInterface extends IteratorAggregate, Countable
/** /**
* Draw a bezier curve on the current image * Draw a bezier curve on the current image
* *
* @link * @link https://image.intervention.io/v3/modifying/drawing#draw-bezier-curves
* @param callable $init * @param callable $init
* @throws RuntimeException * @throws RuntimeException
* @return ImageInterface * @return ImageInterface