mirror of
https://github.com/penpot/penpot.git
synced 2026-05-08 17:48:39 +00:00
* ♻️ Move shape type serialization to wasm module * ♻️ Refactor serialization of constraints and vertical alignment into wasm module * ♻️ Refactor serialization and model of shape blur * ♻️ Refactor bool serialization to the wasm module * ♻️ Split wasm::layout into submodules * ♻️ Refactor serialization of AlignItems, AlignContent, JustifyItems and JustifyContent * ♻️ Refactor serialization of WrapType and FlexDirection * ♻️ Refactor serialization of JustifySelf * ♻️ Refactor serialization of GridCell * ♻️ Refactor serialization of AlignSelf * 🐛 Fix AlignSelf not being serialized * ♻️ Refactor handling of None variants in Raw* enums * ♻️ Refactor serialization of grid direction * ♻️ Refactor serialization of GridTrack and GridTrackType * ♻️ Refactor serialization of Sizing * ♻️ Refactor serialization of ShadowStyle * ♻️ Refactor serialization of StrokeCap and StrokeStyle * ♻️ Refactor serialization of BlendMode * ♻️ Refactor serialization of FontStyle * ♻️ Refactor serialization of GrowType
31 lines
490 B
Rust
31 lines
490 B
Rust
use super::Path;
|
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
pub struct Bool {
|
|
pub bool_type: BoolType,
|
|
pub path: Path,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
|
pub enum BoolType {
|
|
Union,
|
|
Difference,
|
|
Intersection,
|
|
Exclusion,
|
|
}
|
|
|
|
impl Default for Bool {
|
|
fn default() -> Self {
|
|
Bool {
|
|
bool_type: BoolType::Union,
|
|
path: Path::default(),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Default for BoolType {
|
|
fn default() -> Self {
|
|
Self::Union
|
|
}
|
|
}
|