mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-26 07:28:11 +08:00
committed by
Keavon Chambers
parent
f808ee5a94
commit
b2064c7bfd
@@ -5,7 +5,7 @@ use crate::{
|
|||||||
DocumentError, DocumentResponse, LayerId, Operation,
|
DocumentError, DocumentResponse, LayerId, Operation,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Document {
|
pub struct Document {
|
||||||
pub root: Layer,
|
pub root: Layer,
|
||||||
pub work: Layer,
|
pub work: Layer,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use super::LayerData;
|
|||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, Default)]
|
#[derive(Debug, Clone, Copy, PartialEq, Default)]
|
||||||
pub struct Ellipse {}
|
pub struct Ellipse {}
|
||||||
|
|
||||||
impl Ellipse {
|
impl Ellipse {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use super::{style, Layer, LayerData, LayerDataTypes};
|
|||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Folder {
|
pub struct Folder {
|
||||||
next_assignment_id: LayerId,
|
next_assignment_id: LayerId,
|
||||||
pub layer_ids: Vec<LayerId>,
|
pub layer_ids: Vec<LayerId>,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use super::LayerData;
|
|||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub struct Line {}
|
pub struct Line {}
|
||||||
|
|
||||||
impl Line {
|
impl Line {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ pub trait LayerData {
|
|||||||
fn to_kurbo_path(&mut self, transform: glam::DAffine2, style: style::PathStyle) -> BezPath;
|
fn to_kurbo_path(&mut self, transform: glam::DAffine2, style: style::PathStyle) -> BezPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub enum LayerDataTypes {
|
pub enum LayerDataTypes {
|
||||||
Folder(Folder),
|
Folder(Folder),
|
||||||
Ellipse(Ellipse),
|
Ellipse(Ellipse),
|
||||||
@@ -77,7 +77,7 @@ impl LayerDataTypes {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Layer {
|
pub struct Layer {
|
||||||
pub visible: bool,
|
pub visible: bool,
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ use std::fmt::Write;
|
|||||||
|
|
||||||
use super::{style, LayerData};
|
use super::{style, LayerData};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct PolyLine {
|
pub struct PolyLine {
|
||||||
points: Vec<glam::DVec2>,
|
points: Vec<glam::DVec2>,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use super::LayerData;
|
|||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Rect {}
|
pub struct Rect {}
|
||||||
|
|
||||||
impl Rect {
|
impl Rect {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use super::LayerData;
|
|||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Shape {
|
pub struct Shape {
|
||||||
equal_sides: bool,
|
equal_sides: bool,
|
||||||
sides: u8,
|
sides: u8,
|
||||||
|
|||||||
Reference in New Issue
Block a user