mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-25 03:16:01 +00:00
792c1e4710
Release Notes: - N/A --- ``` cargo run -p gpui --example painting ``` I added this demo to verify the detailed support of Path drawing in GPUI. Because of, when we actually used GPUI to draw a 2D line chart, we found that the straight line Path#line_to did not support `anti-aliasing`, and the drawn line looked very bad. As shown in the demo image, if we zoom in on the image, we can clearly see that all the lines are jagged. I read and tried to make some appropriate adjustments to the functions in Path, but since I have no experience in the graphics field, I still cannot achieve anti-aliasing support so far. I don't know if I used it wrong somewhere. I checked `curve_to` and found that the curves drawn have anti-aliasing effects, as shown in the arc part of the figure below. <img width="1136" alt="image" src="https://github.com/user-attachments/assets/4dfb7603-e746-43e9-b737-cff56b56329f"> |
||
---|---|---|
.. | ||
image | ||
svg | ||
animation.rs | ||
gif_viewer.rs | ||
hello_world.rs | ||
image_loading.rs | ||
input.rs | ||
opacity.rs | ||
ownership_post.rs | ||
painting.rs | ||
set_menus.rs | ||
shadow.rs | ||
text_wrapper.rs | ||
uniform_list.rs | ||
window.rs | ||
window_positioning.rs | ||
window_shadow.rs |