Rename graphic subtypes to remove their "data" and "group" suffixes (#2990)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run

* Rename VectorData to Vector

* Rename other VectorData* types to Vector*

* Move assorted data types out of vector_data.rs into misc.rs

* Rename vector_data.rs to vector_types.rs and remove the vector_types module folder

* Rename other references to "vector data"

* Remove label widgets for raster/vector/group to use "-" instead

* Rename RasterData to Raster

* Rename GraphicGroup to Group

* Fix migrations and rename graphic_element.rs -> graphic.rs

* Rename TaggedValue::ArtboardGroup -> TaggedValue::Artboard
This commit is contained in:
Keavon Chambers 2025-08-04 04:53:25 -07:00 committed by GitHub
parent 853c26cbc1
commit c98477d8ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 1820 additions and 1901 deletions

View file

@ -1,6 +1,6 @@
use crate::raster_types::{CPU, GPU, Raster};
use crate::table::Table;
use crate::vector::VectorData;
use crate::vector::Vector;
use crate::{Artboard, Color, Graphic};
use glam::DVec2;
@ -18,22 +18,22 @@ impl<T: RenderComplexity> RenderComplexity for Table<T> {
impl RenderComplexity for Artboard {
fn render_complexity(&self) -> usize {
self.graphic_group.render_complexity()
self.group.render_complexity()
}
}
impl RenderComplexity for Graphic {
fn render_complexity(&self) -> usize {
match self {
Self::GraphicGroup(table) => table.render_complexity(),
Self::VectorData(table) => table.render_complexity(),
Self::RasterDataCPU(table) => table.render_complexity(),
Self::RasterDataGPU(table) => table.render_complexity(),
Self::Group(table) => table.render_complexity(),
Self::Vector(table) => table.render_complexity(),
Self::RasterCPU(table) => table.render_complexity(),
Self::RasterGPU(table) => table.render_complexity(),
}
}
}
impl RenderComplexity for VectorData {
impl RenderComplexity for Vector {
fn render_complexity(&self) -> usize {
self.segment_domain.ids().len()
}