tawasuyu/llimphi
Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.
1// Copyright 2024 the Velato Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4use crate::schema::constants::blend_mode::BlendMode;
5use crate::schema::helpers::visual_object::VisualObject;
6use serde::{Deserialize, Serialize};
7
8/// Base class for all elements of `ShapeLayer` and `Group`
9#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
10pub struct GraphicElementShape {
11 #[serde(flatten)]
12 pub visual_object: VisualObject,
13
14 /// Whether the shape is hidden
15 #[serde(rename = "hd")]
16 #[serde(skip_serializing_if = "Option::is_none")]
17 pub hidden: Option<bool>,
18
19 #[serde(rename = "bm")]
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub blend_mode: Option<BlendMode>,
22
23 /// Index used in expressions
24 #[serde(rename = "ix")]
25 #[serde(skip_serializing_if = "Option::is_none")]
26 pub property_index: Option<f64>,
27
28 /// CSS class used by the SVG renderer
29 #[serde(rename = "cl")]
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub css_class: Option<String>,
32
33 /// `id` attribute used by the SVG renderer
34 #[serde(rename = "ln")]
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub xml_id: Option<String>,
37
38 /// TODO: This is an unknown property, but it showed up sometimes in test
39 /// files.
40 #[serde(rename = "ind")]
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub index: Option<f64>,
43}