| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Co-authored-by: Pranav <kingprawn5000@gmail.com> Co-authored-by: AdwaithBatchu <adwaithbatchu@gmail.com> Co-authored-by: Sreekanth-M8 <kmsreekanthsai@gmail.com> Co-authored-by: Sujal Kumar <sujaljayantkumar06@gmail.com>
|
Thanks for the PR. I‘d like to hold this off until #30777 is in. |
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR summary
closes #30547
This PR enhances the API of draw_path_collection() for long term maintainability.
Summary of Changes
Introduces the new VectorizedGraphicsContextBase class, which is similar to GraphicsContextBase, but each attribute is vectorized. This serves as the dataclass through which all parameters are passed to draw_path_collection().
Updated signature of draw_path_collection() by making the parameters optional in order to support both the following:
Updated signature of _iter_collection() to take vgc instead of gc and added logic to cycle through all attributes.
Changed draw() in Collection to use the new draw_path_collection() API along with temporary fallback for third-party backends that use the old signature.
Why is this change required?
It would become much simpler to add / vectorize new attributes in collections, without completely breaking third party backends. For example, it would greatly simplify #27937, that aims to vectorize the hatch attribute.
To-do
PR checklist