Skip to content
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 a smooth corner painter works better with rectangles with a larger aspect ratio #152

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

AnCoSONG
Copy link

@AnCoSONG AnCoSONG commented Feb 24, 2024

The comparison is shown below.
image

Most of the implementations are close to your original implementation, with the exception of the addition of offset, which allows the superellipse to be drawn independently at the corners without affecting the edges.

I know it's also a choice to use nY when applying smooth corners on rectangles with larger aspect ratio. Therefore, I added a new Class called SmoothCornerPainterV2 instead of adjusting the original ones.

I think the V2 version is a good addition to the existing implementation.

In addition, this is my first formal pr so there's a lot of thing I need to learn. Please forgive me if I made some mistakes. Also it's ok if you don't merge this pr. The reason why I implement this is to meet my own project requirements.

🤞

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

<section>
<div>
<p>Original</p>
<img
Copy link

Choose a reason for hiding this comment

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

This image is missing a text alternative. This is a problem for people using screen readers.

</div>
<div>
<p>V2</p>
<img
Copy link

Choose a reason for hiding this comment

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

This image is missing a text alternative. This is a problem for people using screen readers.

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.

1 participant