pub struct PolystarGeometry {
pub kind: PolystarKind,
pub center: AnimatedPoint,
pub points: Animated<f32>,
pub outer_radius: Animated<f32>,
pub inner_radius: Animated<f32>,
pub outer_roundness: Animated<f32>,
pub inner_roundness: Animated<f32>,
pub rotation_degrees: Animated<f32>,
}Expand description
A regular polygon or a star, its first point straight up from the centre before rotation, the rest clockwise.
Fields§
§kind: PolystarKindA polygon or a star.
center: AnimatedPointCentre.
points: Animated<f32>Number of points (corners of a polygon, tips of a star), from
MIN_POLYSTAR_POINTS to MAX_POLYSTAR_POINTS. A fraction is
dropped when drawn, as Lottie drops it, so an animated count changes
the figure one whole point at a time.
outer_radius: Animated<f32>Distance of the points from the centre, as a fraction of the shorter side. Non-negative.
inner_radius: Animated<f32>A star’s distance of its inner corners from the centre. Non-negative.
outer_roundness: Animated<f32>How round the outer corners are: 0 sharp, 1 a smooth curve through
them. In 0..=1.
inner_roundness: Animated<f32>How round a star’s inner corners are, in 0..=1.
rotation_degrees: Animated<f32>Clockwise rotation about the centre, in degrees.
Trait Implementations§
Source§impl Clone for PolystarGeometry
impl Clone for PolystarGeometry
Source§impl Debug for PolystarGeometry
impl Debug for PolystarGeometry
Source§impl<'de> Deserialize<'de> for PolystarGeometry
impl<'de> Deserialize<'de> for PolystarGeometry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PolystarGeometry
impl PartialEq for PolystarGeometry
Source§impl Serialize for PolystarGeometry
impl Serialize for PolystarGeometry
impl StructuralPartialEq for PolystarGeometry
Auto Trait Implementations§
impl Freeze for PolystarGeometry
impl RefUnwindSafe for PolystarGeometry
impl Send for PolystarGeometry
impl Sync for PolystarGeometry
impl Unpin for PolystarGeometry
impl UnsafeUnpin for PolystarGeometry
impl UnwindSafe for PolystarGeometry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more