pub struct BorderRadii {
pub top_left: f32,
pub top_right: f32,
pub bottom_left: f32,
pub bottom_right: f32,
}Expand description
A set of border radii for a rounded rectangle
Fields§
§top_left: f32§top_right: f32§bottom_left: f32§bottom_right: f32Implementations§
Source§impl BorderRadii
Represents the radii of each corner for a rounded rectangle.
impl BorderRadii
Represents the radii of each corner for a rounded rectangle.
§Fields
top_left: Radius of the top-left corner.top_right: Radius of the top-right corner.bottom_left: Radius of the bottom-left corner.bottom_right: Radius of the bottom-right corner.
§Examples
Creating uniform and non-uniform border radii:
use grafo::BorderRadii;
// Uniform border radii
let uniform_radii = BorderRadii::new(10.0);
// Custom border radii
let custom_radii = BorderRadii {
top_left: 5.0,
top_right: 10.0,
bottom_left: 15.0,
bottom_right: 20.0,
};Trait Implementations§
Source§impl Clone for BorderRadii
impl Clone for BorderRadii
Source§fn clone(&self) -> BorderRadii
fn clone(&self) -> BorderRadii
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 BorderRadii
impl Debug for BorderRadii
Source§impl Default for BorderRadii
impl Default for BorderRadii
Source§fn default() -> BorderRadii
fn default() -> BorderRadii
Returns the “default value” for a type. Read more
Source§impl Display for BorderRadii
impl Display for BorderRadii
Source§impl From<BorderRadii> for BorderRadii
impl From<BorderRadii> for BorderRadii
Source§fn from(val: BorderRadii) -> Self
fn from(val: BorderRadii) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BorderRadii
impl PartialEq for BorderRadii
Source§impl PartialOrd for BorderRadii
impl PartialOrd for BorderRadii
impl Copy for BorderRadii
impl StructuralPartialEq for BorderRadii
Auto Trait Implementations§
impl Freeze for BorderRadii
impl RefUnwindSafe for BorderRadii
impl Send for BorderRadii
impl Sync for BorderRadii
impl Unpin for BorderRadii
impl UnwindSafe for BorderRadii
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more