pub struct Radius {
pub top_left: f32,
pub top_right: f32,
pub bottom_right: f32,
pub bottom_left: f32,
}Expand description
The border radii for the corners of a graphics primitive in the order: top-left, top-right, bottom-right, bottom-left.
Fields§
§top_left: f32Top left radius
top_right: f32Top right radius
bottom_right: f32Bottom right radius
bottom_left: f32Bottom left radius
Implementations§
Source§impl Radius
impl Radius
Sourcepub fn new(value: impl Into<Pixels>) -> Self
pub fn new(value: impl Into<Pixels>) -> Self
Creates a new Radius with the same value for each corner.
Sourcepub fn top_right(self, value: impl Into<Pixels>) -> Self
pub fn top_right(self, value: impl Into<Pixels>) -> Self
Sets the top right value of the Radius.
Sourcepub fn bottom_right(self, value: impl Into<Pixels>) -> Self
pub fn bottom_right(self, value: impl Into<Pixels>) -> Self
Sets the bottom right value of the Radius.
Sourcepub fn bottom_left(self, value: impl Into<Pixels>) -> Self
pub fn bottom_left(self, value: impl Into<Pixels>) -> Self
Sets the bottom left value of the Radius.
Sourcepub fn top(self, value: impl Into<Pixels>) -> Self
pub fn top(self, value: impl Into<Pixels>) -> Self
Sets the top left and top right values of the Radius.
Sourcepub fn bottom(self, value: impl Into<Pixels>) -> Self
pub fn bottom(self, value: impl Into<Pixels>) -> Self
Sets the bottom left and bottom right values of the Radius.
Trait Implementations§
impl Copy for Radius
impl StructuralPartialEq for Radius
Auto Trait Implementations§
impl Freeze for Radius
impl RefUnwindSafe for Radius
impl Send for Radius
impl Sync for Radius
impl Unpin for Radius
impl UnwindSafe for Radius
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