Skip to content

Conversation

@KR155E
Copy link
Contributor

@KR155E KR155E commented Feb 22, 2025

🚀 [Resolves #103]

Preview

Screenshot 2025-02-22 at 17-16-37 Introduction _ About - Page ⋅ Storybook

Changes

This PR adds four new tools to draw rectangles and ellipses (filled and unfilled variants, respectively). Uses a variation of Bresenham's Midpoint circle algorithm to draw ellipses and a simple custom algorithm to draw rectangles.

It also removes the hover pixel preview when drawing a rectangle, ellipse or line as well as when using the selection tool.

@hunkim98
Copy link
Owner

hunkim98 commented Mar 7, 2025

I'll look into this issue this weekend!

Copy link
Owner

@hunkim98 hunkim98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in reviewing the pull request. The features you have added is working well! May I ask you to write a code for getBresenhamEllipseIndices if you have time? Thanks!

@hunkim98
Copy link
Owner

hunkim98 commented Mar 13, 2025

I think it is time we use a factory/strategy method to arrange the tools. This will allow other developers create new tools easily!

#13

You may proceed to merge the code to the main branch!

@KR155E
Copy link
Contributor Author

KR155E commented Mar 13, 2025

No worries. Thanks for the review! Can you do the honors of merging the PR and creating a new npm release? I don't have the privileges.

@hunkim98
Copy link
Owner

Sure! Will do now

@hunkim98 hunkim98 merged commit de1a7bc into hunkim98:main Mar 13, 2025
0 of 2 checks passed
@KR155E
Copy link
Contributor Author

KR155E commented Mar 13, 2025

May I ask you to write a code for getBresenhamEllipseIndices if you have time? Thanks!

You mean a test? OK. I might come back with more contributions and will see if I can write one then. :-)

@hunkim98
Copy link
Owner

Published!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: add additional tools, e.g. line drawing tools

2 participants