Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[dart:ui] Add Path.addRSuperellipse (alternative) #166167

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

Closed
wants to merge 3 commits into from

Conversation

dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Mar 28, 2025

This PR adds Path.addRSuperellipse to dart:ui. This is needed to implement a parity class to RoundedRectangleBorder as discussed here.

An alternative to #166045, this PR does not diverge at the dl_builder level, but simply implements pathing for both dart:ui and impeller::PathBuilder::addRSuperellipse with the same code. This avoids the DrawRSuperellipse op having varying size depending on drawing style, although it doesn't have the benefit that @/jonahwilliams hoped to calculate the path less frequently.

I think this is a better approach for its simpleness. If we want to calculate tessellation/path less frequently, we might want to do it in a grander scale for all shapes in a separate PR.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added engine flutter/engine repository. See also e: labels. platform-web Web applications specifically e: impeller Impeller rendering backend issues and features requests labels Mar 28, 2025
@dkwingsmt
Copy link
Contributor Author

cc @jonahwilliams @flar

@dkwingsmt dkwingsmt closed this Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e: impeller Impeller rendering backend issues and features requests engine flutter/engine repository. See also e: labels. platform-web Web applications specifically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant