ZIm/crates/gpui/examples
Jason Lee 31fa414422
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"
/>
2025-01-29 22:14:33 +02:00
..
image Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
svg Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
animation.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
gif_viewer.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
gradient.rs gpui: Add PathBuilder based on lyon to build Path (#22808) 2025-01-29 22:14:33 +02:00
hello_world.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
image_loading.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
input.rs Remove more references to 'model' in GPUI APIs (#23693) 2025-01-27 04:00:27 +00:00
opacity.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
ownership_post.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
painting.rs gpui: Add PathBuilder based on lyon to build Path (#22808) 2025-01-29 22:14:33 +02:00
pattern.rs Revert "gpui & ui: Use shader for dashed dividers" (#23850) 2025-01-29 19:19:20 +00:00
set_menus.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
shadow.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
text_wrapper.rs gpui: Add line_clamp to truncate text after a specified number of lines (#23058) 2025-01-29 22:14:24 +02:00
uniform_list.rs Remove more references to 'model' in GPUI APIs (#23693) 2025-01-27 04:00:27 +00:00
window.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
window_positioning.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
window_shadow.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00