tawasuyu

tawasuyu/llimphi

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

Rust 124Markdown 82TOML 78Shell 12149 Definiciones

⎇ main shared/foreign-lottie/src/schema/shapes/base_gradient.rs Rust · 39 líneas · 1.3 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::animated_properties::gradient_colors::GradientColors;
5use crate::schema::animated_properties::multi_dimensional::MultiDimensional;
6use crate::schema::animated_properties::value::FloatValue;
7use crate::schema::constants::gradient_type::GradientType;
8
9use serde::{Deserialize, Serialize};
10
11#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
12/// Represents a gradient.
13pub struct BaseGradientShape {
14    /// Describes the gradient colors.
15    #[serde(rename = "g")]
16    pub colors: GradientColors,
17
18    /// Describes the starting point for the gradient.
19    #[serde(rename = "s")]
20    pub start_point: MultiDimensional,
21
22    /// Describes the end point for the gradient.
23    #[serde(rename = "e")]
24    pub end_point: MultiDimensional,
25
26    /// Indicates the type of the gradient.
27    #[serde(rename = "t")]
28    pub gradient_type: Option<GradientType>,
29
30    /// Represents the highlight length as a percentage between start and end
31    /// points.
32    #[serde(rename = "h")]
33    pub highlight_length: Option<FloatValue>,
34
35    /// Specifies the highlight angle relative to the direction from start to
36    /// end points.
37    #[serde(rename = "a")]
38    pub highlight_angle: Option<FloatValue>,
39}