mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01: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
19 lines
386 B
Rust
19 lines
386 B
Rust
use skia_safe as skia;
|
|
|
|
#[derive(Debug, PartialEq, Clone, Copy)]
|
|
pub struct BlendMode(pub skia::BlendMode);
|
|
|
|
impl Default for BlendMode {
|
|
fn default() -> Self {
|
|
BlendMode(skia::BlendMode::SrcOver)
|
|
}
|
|
}
|
|
|
|
impl From<BlendMode> for skia::BlendMode {
|
|
fn from(val: BlendMode) -> Self {
|
|
match val {
|
|
BlendMode(skia_blend) => skia_blend,
|
|
}
|
|
}
|
|
}
|