pub struct BorderRadius {
    pub top_left: f32,
    pub top_right: f32,
    pub bottom_right: f32,
    pub bottom_left: f32,
}Expand description
Radi of the corners on a rounded rectangle.
Fields§
§top_left: f32The top left corner radius.
top_right: f32The top right corner radius.
bottom_right: f32The bottom right corner radius.
bottom_left: f32The bottom left corner radius.
Implementations§
Source§impl BorderRadius
 
impl BorderRadius
Sourcepub const ZERO: Self = _
 
pub const ZERO: Self = _
A BorderRadius with zero radius on all corners.
Sourcepub const fn new(
    top_left: f32,
    top_right: f32,
    bottom_right: f32,
    bottom_left: f32,
) -> Self
 
pub const fn new( top_left: f32, top_right: f32, bottom_right: f32, bottom_left: f32, ) -> Self
Create a new BorderRadius.
Sourcepub const fn all(radius: f32) -> Self
 
pub const fn all(radius: f32) -> Self
Create a new BorderRadius with the same radius on all corners.
Sourcepub fn max_element(&self) -> f32
 
pub fn max_element(&self) -> f32
Get the maximum radius of the corners.
Sourcepub fn min_element(&self) -> f32
 
pub fn min_element(&self) -> f32
Get the minimum radius of the corners.
Trait Implementations§
Source§impl Clone for BorderRadius
 
impl Clone for BorderRadius
Source§fn clone(&self) -> BorderRadius
 
fn clone(&self) -> BorderRadius
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for BorderRadius
 
impl Debug for BorderRadius
Source§impl Default for BorderRadius
 
impl Default for BorderRadius
Source§fn default() -> BorderRadius
 
fn default() -> BorderRadius
Returns the “default value” for a type. Read more
Source§impl From<BorderRadius> for [f32; 4]
 
impl From<BorderRadius> for [f32; 4]
Source§fn from(radius: BorderRadius) -> Self
 
fn from(radius: BorderRadius) -> Self
Converts to this type from the input type.
Source§impl From<f32> for BorderRadius
 
impl From<f32> for BorderRadius
Source§impl PartialEq for BorderRadius
 
impl PartialEq for BorderRadius
impl Copy for BorderRadius
impl StructuralPartialEq for BorderRadius
Auto Trait Implementations§
impl Freeze for BorderRadius
impl RefUnwindSafe for BorderRadius
impl Send for BorderRadius
impl Sync for BorderRadius
impl Unpin for BorderRadius
impl UnwindSafe for BorderRadius
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