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: f32
Top left radius
top_right: f32
Top right radius
bottom_right: f32
Bottom right radius
bottom_left: f32
Bottom 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.