mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 00:58:12 +08:00
Add the document graph (#1217)
* Thumbnails for the layer node * Raster node graph frames * Downscale to a random resolution * Cleanup and bug fixes * Generate paths before duplicating outputs * Fix stable id test * Add a document node graph * Fix merge conflict --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
d45e7cb755
commit
44d16c42f5
@@ -46,7 +46,9 @@ pub struct GraphicElement {
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub struct Artboard {
|
||||
pub graphic_group: GraphicGroup,
|
||||
pub bounds: Option<[IVec2; 2]>,
|
||||
pub location: IVec2,
|
||||
pub dimensions: IVec2,
|
||||
pub background: Color,
|
||||
}
|
||||
|
||||
pub struct ConstructLayerNode<Name, BlendMode, Opacity, Visible, Locked, Collapsed, Stack> {
|
||||
@@ -82,13 +84,20 @@ fn construct_layer<Data: Into<GraphicElementData>>(
|
||||
stack
|
||||
}
|
||||
|
||||
pub struct ConstructArtboardNode<Bounds> {
|
||||
bounds: Bounds,
|
||||
pub struct ConstructArtboardNode<Location, Dimensions, Background> {
|
||||
location: Location,
|
||||
dimensions: Dimensions,
|
||||
background: Background,
|
||||
}
|
||||
|
||||
#[node_fn(ConstructArtboardNode)]
|
||||
fn construct_artboard(graphic_group: GraphicGroup, bounds: Option<[IVec2; 2]>) -> Artboard {
|
||||
Artboard { graphic_group, bounds }
|
||||
fn construct_artboard(graphic_group: GraphicGroup, location: IVec2, dimensions: IVec2, background: Color) -> Artboard {
|
||||
Artboard {
|
||||
graphic_group,
|
||||
location,
|
||||
dimensions,
|
||||
background,
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ImageFrame<Color>> for GraphicElementData {
|
||||
|
||||
Reference in New Issue
Block a user