gioser

tawasuyu/llimphi

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

Rust 660Markdown 302TOML 157RON 312382 Definitions

⎇ main shared/foreign-lottie/src/schema/shapes/polystar.rs Rust · 40 lines · 1.3 KB History Who touched what raw

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::value::FloatValue;
5use crate::schema::constants::star_type::StarType;
6use crate::schema::{animated_properties::position::Position, shapes::shape::Shape};
7use serde::{Deserialize, Serialize};
8
9/// Regular polygon or star.
10#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
11pub struct PolyStarShape {
12    #[serde(flatten)]
13    pub shape: Shape,
14    /// Position
15    #[serde(rename = "p")]
16    pub position: Position,
17    /// Outer Radius
18    #[serde(rename = "or")]
19    pub outer_radius: FloatValue,
20    /// Outer Roundness as a percentage
21    #[serde(rename = "os")]
22    pub outer_roundness: FloatValue,
23    /// Rotation, clockwise in degrees
24    #[serde(rename = "r")]
25    pub rotation: FloatValue,
26    /// Points
27    #[serde(rename = "pt")]
28    pub points: FloatValue,
29    /// Star type, 1 for Star, 2 for Polygon
30    #[serde(rename = "sy")]
31    pub star_type: StarType,
32    /// If sy is 1 (star) you also have attributes defining the inner ends of
33    /// the star:
34    /// Points
35    #[serde(rename = "ir")]
36    pub inner_radius: Option<FloatValue>,
37    /// Star type, 1 for Star, 2 for Polygon
38    #[serde(rename = "is")]
39    pub inner_roundness: Option<FloatValue>,
40}