tessera_ui_basic_components/shape_def.rs
1//! Defines the basic shape types used by components.
2
3/// An enum to explicitly define the shape of a component.
4#[derive(Clone, Copy, Debug, PartialEq)]
5pub enum Shape {
6 /// A rectangle with rounded corners.
7 RoundedRectangle { corner_radius: f32, g2_k_value: f32 },
8 /// An ellipse that fills the component's bounds.
9 Ellipse,
10}
11
12impl Default for Shape {
13 fn default() -> Self {
14 Shape::RoundedRectangle {
15 corner_radius: 0.0,
16 g2_k_value: 3.0,
17 }
18 }
19}