mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 03:18:06 +08:00
Add colors in Rust (#78)
* 🎨 Add colors in Rust * 🌿 Use an option for the properties and #[repr(C)] * ❌ Remove WASM dependency on document. * 😎 Wrap Fill and stroke in a style struct. * 📦 Use crate::Color * Merge Add transactions for temporary modifications to the document * Run cargo fmt * Color without a 'U'
This commit is contained in:
committed by
Keavon Chambers
parent
2849b99b59
commit
46c9ef02ca
@@ -1,4 +1,4 @@
|
||||
use crate::LayerId;
|
||||
use crate::{layers::style, LayerId};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum Operation {
|
||||
@@ -8,6 +8,7 @@ pub enum Operation {
|
||||
cx: f64,
|
||||
cy: f64,
|
||||
r: f64,
|
||||
style: style::PathStyle,
|
||||
},
|
||||
AddRect {
|
||||
path: Vec<LayerId>,
|
||||
@@ -16,6 +17,7 @@ pub enum Operation {
|
||||
y0: f64,
|
||||
x1: f64,
|
||||
y1: f64,
|
||||
style: style::PathStyle,
|
||||
},
|
||||
AddLine {
|
||||
path: Vec<LayerId>,
|
||||
@@ -24,6 +26,7 @@ pub enum Operation {
|
||||
y0: f64,
|
||||
x1: f64,
|
||||
y1: f64,
|
||||
style: style::PathStyle,
|
||||
},
|
||||
AddShape {
|
||||
path: Vec<LayerId>,
|
||||
@@ -33,6 +36,7 @@ pub enum Operation {
|
||||
x1: f64,
|
||||
y1: f64,
|
||||
sides: u8,
|
||||
style: style::PathStyle,
|
||||
},
|
||||
DeleteLayer {
|
||||
path: Vec<LayerId>,
|
||||
|
||||
Reference in New Issue
Block a user