pub struct RoundedCornerShape { /* private fields */ }Expand description
A rectangle shape with rounded corners. Compose’s RoundedCornerShape.
Implementations§
Source§impl RoundedCornerShape
impl RoundedCornerShape
Sourcepub fn new(
top_left: f32,
top_right: f32,
bottom_right: f32,
bottom_left: f32,
) -> RoundedCornerShape
pub fn new( top_left: f32, top_right: f32, bottom_right: f32, bottom_left: f32, ) -> RoundedCornerShape
Creates a shape with a separate radius for each corner, in logical pixels.
Sourcepub fn uniform(radius: f32) -> RoundedCornerShape
pub fn uniform(radius: f32) -> RoundedCornerShape
Creates a shape with the same radius on all four corners.
Sourcepub fn with_radii(radii: CornerRadii) -> RoundedCornerShape
pub fn with_radii(radii: CornerRadii) -> RoundedCornerShape
Creates a shape from a CornerRadii value.
Sourcepub fn resolve(&self, width: f32, height: f32) -> CornerRadii
pub fn resolve(&self, width: f32, height: f32) -> CornerRadii
Returns the radii for a rectangle of width by height, with each radius limited to half
the width and half the height so the corners fit.
Sourcepub fn radii(&self) -> CornerRadii
pub fn radii(&self) -> CornerRadii
The radii as given, before any clamping to a size.
Trait Implementations§
Source§impl Clone for RoundedCornerShape
impl Clone for RoundedCornerShape
Source§fn clone(&self) -> RoundedCornerShape
fn clone(&self) -> RoundedCornerShape
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 moreimpl Copy for RoundedCornerShape
Source§impl Debug for RoundedCornerShape
impl Debug for RoundedCornerShape
Source§impl PartialEq for RoundedCornerShape
impl PartialEq for RoundedCornerShape
impl StructuralPartialEq for RoundedCornerShape
Auto Trait Implementations§
impl Freeze for RoundedCornerShape
impl RefUnwindSafe for RoundedCornerShape
impl Send for RoundedCornerShape
impl Sync for RoundedCornerShape
impl Unpin for RoundedCornerShape
impl UnsafeUnpin for RoundedCornerShape
impl UnwindSafe for RoundedCornerShape
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> ErasedDestructor for Twhere
T: 'static,
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