-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bezier curve drawing tool #1363
Add bezier curve drawing tool #1363
Conversation
Wow, this is just flawless! I'm going to try the feature in detail, but I think it can be adopted as is and become part of version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have a few small change requests. Otherwise, very good work!
* @param float $t | ||
* @return array{'x': float, 'y': float} | ||
*/ | ||
public function calculateQuadraticBezierInterpolationPoint(float $t = 0.05): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method can be private to make it clear that it is only used locally.
public function calculateQuadraticBezierInterpolationPoint(float $t = 0.05): array | |
private function calculateQuadraticBezierInterpolationPoint(float $t = 0.05): array |
* @param float $t | ||
* @return array{'x': float, 'y': float} | ||
*/ | ||
public function calculateCubicBezierInterpolationPoint(float $t = 0.05): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method can be private to make it clear that it is only used locally.
public function calculateCubicBezierInterpolationPoint(float $t = 0.05): array | |
private function calculateCubicBezierInterpolationPoint(float $t = 0.05): array |
* @throws GeometryException | ||
* @return array{0: array<mixed>, 1: array<mixed>} | ||
*/ | ||
public function calculateBezierPoints(): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method can be private to make it clear that it is only used locally.
public function calculateBezierPoints(): array | |
private function calculateBezierPoints(): array |
src/Interfaces/ImageInterface.php
Outdated
/** | ||
* Draw a bezier curve on the current image | ||
* | ||
* @link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation not yet available but let's take this link.
* @link | |
* @link https://image.intervention.io/v3/modifying/drawing#draw-bezier-curves |
Thank you for your feedback and suggestions Oliver, I have made the changes. |
This commit adds a new bezier curve drawing tool as discussed in #1335.
The following code can be used to generate the sample image below: