gpui: Add paint_path example (#20499)
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">
J
Jason Lee committed
792c1e47104a61e79b4505e66064e39f9f7ff57d
Parent: b421ffa
Committed by GitHub <noreply@github.com>
on 11/16/2024, 11:36:13 AM