-
Notifications
You must be signed in to change notification settings - Fork 3.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
gpui: Add PathBuilder
based on lyon to build Path
#22808
Conversation
move_to
method to Path
.move_to
method to Path
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Thanks for pointing out. The algorithm was written so for lacking such stroking algo and for performance consideration |
@huacnlee and @JakkuSakura : If we wanted to animate a graph showing the performance of a program, how much of an impact would it have on the Registrazione.schermo.2025-01-08.alle.09.33.56.mov |
This comment was marked as outdated.
This comment was marked as outdated.
move_to
method to Path
PathBuilder
based on lyon to build Path
Today I make a update to add |
PathBuilder
based on lyon to build PathPathBuilder
based on lyon to build Path
This is with MSAA enable by #22812 ![]() ![]() ![]() |
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.
Same comment as in #22812 (review)
@huacnlee can we merge/rebase on fresh main please? |
@SomeoneToIgnore Done. |
Closes #20762 Release Notes: - N/A --- Enable MSAA for Anti-Aliasing to Path (`cx.paint_path`) for drawing a better vector graphics. ```bash cargo run -p gpui --example gradient --features macos-blade cargo run -p gpui --example gradient cargo run -p gpui --example painting --features macos-blade cargo run -p gpui --example painting ``` **Before** <img width="1089" alt="image" src="https://github.com/user-attachments/assets/0ae7240f-4ba9-4ef5-896c-e436c1282770" /> **After** <img width="944" alt="image" src="https://github.com/user-attachments/assets/71a07ae8-be54-452c-aacc-b8cec1f810c0" /> ## TODO - [x] Support Metal and Blade. - [x] Detect system support to set up sample count. - [x] Fix extra lines between Path vertices wait #22808 to merge. Ref kvark/blade#213 Ask @kvark to review. I am not sure if there is anything I missed. I modified it according to the [particle](https://github.com/kvark/blade/tree/main/examples/particle) example of Blade project. But the difference is that after the first MSAA render, I did not do it a second time, I tested it and found it was not necessary.
This reverts commit 31fa414.
…lection top right corner radius issue (#24342) Release Notes: - N/A ---- To fix #24289 mention issue and revert PathBuilder and MSAA. I'm sorry about of this, in #22808 I was forgotten this bit of detail. ![image](https://github.com/user-attachments/assets/112afda2-088c-41d0-83bd-808f6cd2f9d5) So, add `move_to` here, we can fix the selection top right corner radius issue. ## After change <img width="1383" alt="image" src="https://github.com/user-attachments/assets/28ea103c-d652-41d6-bbe0-7fd042d81e77" />
Release Notes:
Continue #20499
We to draw more complex Path. Before this change, we only have
line_to
, but it is not enough.Add a new
PathBuilder
to use lyon to build more complex path.And then with PR #22812 to enable anti-aliasing, all thing will be perfect.
Show case
Before:
After: