FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CornerRadius

    struct · ferroui-base · v0.5.0

    struct CornerRadius
    

    Represents the radii of a rectangle's corners.

    View source

    Members

    top_left

    top_left: f64
    

    Radius of the top left corner.

    Source

    top_right

    top_right: f64
    

    Radius of the top right corner.

    Source

    bottom_right

    bottom_right: f64
    

    Radius of the bottom right corner.

    Source

    bottom_left

    bottom_left: f64
    

    Radius of the bottom left corner.

    Source

    new

    const fn new(top_left: f64, top_right: f64, bottom_right: f64, bottom_left: f64) -> Self
    

    Initializes a CornerRadius from the four corner radii, clockwise from the top left.

    Source

    uniform

    const fn uniform(uniform_radius: f64) -> Self
    

    Initializes a CornerRadius with the same radius on every corner.

    Source

    top_bottom

    const fn top_bottom(top: f64, bottom: f64) -> Self
    

    Initializes a CornerRadius from the radius of the top corners and the radius of the bottom corners.

    Source

    is_uniform

    fn is_uniform(self: &Self) -> bool
    

    Gets a value indicating whether the instance has equal values for all corners (NaN compares equal to NaN here).

    Source

    equals

    fn equals(self: &Self, other: CornerRadius) -> bool
    

    Returns a boolean indicating whether the corner radius is equal to the other given corner radius (exact comparison).

    Source

    parse

    fn parse(s: &str) -> Result<Self, FormatError>
    

    Parses a CornerRadius string: one, two or four numbers.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.