CornerRadius
struct · ferroui-base · v0.5.0
struct CornerRadius
Represents the radii of a rectangle's corners.
Members
top_left
top_left: f64
Radius of the top left corner.
top_right
top_right: f64
Radius of the top right corner.
bottom_right
bottom_right: f64
Radius of the bottom right corner.
bottom_left
bottom_left: f64
Radius of the bottom left corner.
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.
uniform
const fn uniform(uniform_radius: f64) -> Self
Initializes a CornerRadius with the same radius on every corner.
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.
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).
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).
parse
fn parse(s: &str) -> Result<Self, FormatError>
Parses a CornerRadius string: one, two or four numbers.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherTransition<CornerRadius>ServerPropertyValueBatchValueCloneCopyDebugStructuralPartialEqPartialEqDefaultFromStrDisplayMarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.