pub struct CornerRadius(/* private fields */);Expand description
Four corner radii measured in device-independent pixels (DIPs).
Implementations§
Source§impl CornerRadius
impl CornerRadius
Sourcepub fn new(
top_left: f64,
top_right: f64,
bottom_right: f64,
bottom_left: f64,
) -> Self
pub fn new( top_left: f64, top_right: f64, bottom_right: f64, bottom_left: f64, ) -> Self
Creates radii in top-left, top-right, bottom-right, bottom-left order.
pub fn top_left(&self) -> f64
pub fn top_right(&self) -> f64
pub fn bottom_right(&self) -> f64
pub fn bottom_left(&self) -> f64
Trait Implementations§
Source§impl Clone for CornerRadius
impl Clone for CornerRadius
Source§fn clone(&self) -> CornerRadius
fn clone(&self) -> CornerRadius
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CornerRadius
impl Debug for CornerRadius
Source§impl Default for CornerRadius
impl Default for CornerRadius
Source§impl From<CornerRadius> for ResourceValue
impl From<CornerRadius> for ResourceValue
Source§fn from(value: CornerRadius) -> Self
fn from(value: CornerRadius) -> Self
Converts to this type from the input type.
Source§impl From<f64> for CornerRadius
impl From<f64> for CornerRadius
Auto Trait Implementations§
impl !Send for CornerRadius
impl !Sync for CornerRadius
impl Freeze for CornerRadius
impl RefUnwindSafe for CornerRadius
impl Unpin for CornerRadius
impl UnsafeUnpin for CornerRadius
impl UnwindSafe for CornerRadius
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