Replace the Artboard struct with a Table<Table<Graphic>> shape (#4077)

* Replace the Artboard struct with a Table<Table<Graphic>> shape

* Remove the never-functional, seemingly unneeded migrate_type_descriptor_names due to typo

* Allow negative artboard sizes
This commit is contained in:
Keavon Chambers
2026-04-28 22:58:33 -07:00
committed by GitHub
parent 0847d7b0ab
commit ba63c26c62
27 changed files with 350 additions and 442 deletions
@@ -1,7 +1,7 @@
use crate::messages::layout::utility_types::widget_prelude::*;
use crate::messages::portfolio::document::utility_types::document_metadata::LayerNodeIdentifier;
use crate::messages::prelude::*;
use glam::{IVec2, UVec2};
use glam::UVec2;
use graph_craft::document::NodeId;
use graphene_std::Color;
@@ -47,7 +47,10 @@ impl MessageHandler<NewDocumentDialogMessage, ()> for NewDocumentDialogMessageHa
// Finite canvas: create an artboard with the specified dimensions
responses.add(GraphOperationMessage::NewArtboard {
id: NodeId::new(),
artboard: graphene_std::Artboard::new(IVec2::ZERO, self.dimensions.as_ivec2()),
location: glam::DVec2::ZERO,
dimensions: self.dimensions.as_dvec2(),
background: Color::WHITE,
clip: true,
});
responses.add(NavigationMessage::CanvasPan { delta: self.dimensions.as_dvec2() });
}