gioser

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 660Markdown 302TOML 157RON 312382 Definiciones

⎇ main shared/foreign-lottie/src/schema/shapes/graphic_element.rs Rust · 43 líneas · 1.4 KB Historia Quién tocó qué crudo

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

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}