Rename the Graphic enum wrapper variants with a "List" suffix (#4434)

* Make the Artboard and Gradient newtype fields public to match the other list newtypes

* Rename the Graphic enum's self-named Graphic::Graphic variant to Graphic::GraphicList

* Rename the Graphic::Vector variant to Graphic::VectorList

* Rename the Graphic::RasterCPU variant to Graphic::RasterCPUList

* Rename the Graphic::RasterGPU variant to Graphic::RasterGPUList

* Rename the Graphic::Color variant to Graphic::ColorList

* Rename the Graphic::Gradient variant to Graphic::GradientList

* Rename the Graphic::Text variant to Graphic::TextList

* Restore the SVG group tag comment that the variant rename sweep clobbered
This commit is contained in:
Keavon Chambers
2026-08-14 18:55:07 -07:00
committed by GitHub
parent d117c3eace
commit 69585b25e3
12 changed files with 231 additions and 231 deletions

View File

@@ -224,9 +224,9 @@ fn flatten_vector(graphic_list: &List<Graphic>) -> List<Vector> {
};
match graphic.clone() {
Graphic::Vector(vector) => vector.into_iter().map(compose_parent).collect::<Vec<_>>(),
Graphic::Text(text) => text_nodes::shape_text_list(&text, false).into_iter().map(compose_parent).collect::<Vec<_>>(),
Graphic::Graphic(mut graphic) => {
Graphic::VectorList(vector) => vector.into_iter().map(compose_parent).collect::<Vec<_>>(),
Graphic::TextList(text) => text_nodes::shape_text_list(&text, false).into_iter().map(compose_parent).collect::<Vec<_>>(),
Graphic::GraphicList(mut graphic) => {
if parent_has_transform {
for transform in graphic.iter_attribute_values_mut_or_default::<DAffine2>(ATTR_TRANSFORM) {
*transform = parent_transform * *transform;
@@ -261,7 +261,7 @@ fn flatten_vector(graphic_list: &List<Graphic>) -> List<Vector> {
}
}
// Rasters, colors, and gradients bound no region, so they contribute no operand
Graphic::None | Graphic::RasterCPU(_) | Graphic::RasterGPU(_) | Graphic::Color(_) | Graphic::Gradient(_) => Vec::new(),
Graphic::None | Graphic::RasterCPUList(_) | Graphic::RasterGPUList(_) | Graphic::ColorList(_) | Graphic::GradientList(_) => Vec::new(),
}
})
.collect()