# gpui: Add \`PathBuilder\` based on lyon to build \`Path\` \(\#22808\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/31fa4144226fcbd140bb4f26d80001f0abd6facd)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 31fa4144226fcbd140bb4f26d80001f0abd6facd

Requested commit: 31fa4144226fcbd140bb4f26d80001f0abd6facd

Commit: 31fa4144226fcbd140bb4f26d80001f0abd6facd

Tree: 1c3057730c675016e4576b0e7a61a607cc029412

Author: Jason Lee

Committer: GitHub

## Message

````
gpui: Add `PathBuilder` based on lyon to build `Path` (#22808)

Release Notes:

- N/A

---

Continue https://github.com/zed-industries/zed/pull/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](https://github.com/nical/lyon) to
build more complex path.

And then with PR #22812 to enable anti-aliasing, all thing will be
perfect.
## Show case

```bash
cargo run -p gpui --example painting
```

Before:

<img width="1136" alt="image"
src="https://github.com/user-attachments/assets/0c15833a-ec95-404c-a469-24cf172cfd86"
/>

After:

<img width="1136" alt="image"
src="https://github.com/user-attachments/assets/42cfa35e-7e8f-4ef3-bb2d-b98defc62ad6"
/>
````

## Parents

- [706f7be5e79a44fc767dfbeadce1f390e7f43d9f](https://git.cafe/gitcafe/zed/commit/706f7be5e79a44fc767dfbeadce1f390e7f43d9f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/31fa4144226fcbd140bb4f26d80001f0abd6facd?format=markdown)
