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::animated_properties::position::Position;
5use crate::schema::animated_properties::value::FloatValue;
6use crate::schema::{
7 animated_properties::multi_dimensional::MultiDimensional, shapes::shape::Shape,
8};
9use serde::{Deserialize, Serialize};
10
11use super::graphic_element::GraphicElementShape;
12
13/// A rectangle, defined by its center point and size.
14#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
15pub struct RectangleShape {
16 #[serde(flatten)]
17 pub shape: Shape,
18 /// Center of the rectangle
19 #[serde(rename = "p")]
20 pub position: Position,
21 /// Size
22 #[serde(rename = "s")]
23 pub size: MultiDimensional,
24 /// Rounded corners radius
25 #[serde(rename = "r")]
26 pub rounded_corner_radius: FloatValue,
27}