Skip to content

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

Closed
dkwingsmt wants to merge 3 commits intoflutter:masterfrom
dkwingsmt:rse-path3
Closed

[dart:ui] Add Path.addRSuperellipse (alternative)#166167
dkwingsmt wants to merge 3 commits intoflutter:masterfrom
dkwingsmt:rse-path3

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 related. 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 related. See also e: labels. platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant