pub type DipCornerRadius = CornerRadius2D<Dip, Dip>;
Expand description
Corner-radius in device independent pixels.
Aliased Type§
struct DipCornerRadius {
pub top_left: Size2D<Dip, Dip>,
pub top_right: Size2D<Dip, Dip>,
pub bottom_right: Size2D<Dip, Dip>,
pub bottom_left: Size2D<Dip, Dip>,
}
Fields§
§top_left: Size2D<Dip, Dip>
Top-left corner radius.
top_right: Size2D<Dip, Dip>
Top-right corner radius.
bottom_right: Size2D<Dip, Dip>
Bottom-right corner radius.
bottom_left: Size2D<Dip, Dip>
Bottom-left corner radius.
Implementations
Source§impl<T, U> CornerRadius2D<T, U>
impl<T, U> CornerRadius2D<T, U>
Sourcepub fn new(
top_left: Size2D<T, U>,
top_right: Size2D<T, U>,
bottom_right: Size2D<T, U>,
bottom_left: Size2D<T, U>,
) -> CornerRadius2D<T, U>
pub fn new( top_left: Size2D<T, U>, top_right: Size2D<T, U>, bottom_right: Size2D<T, U>, bottom_left: Size2D<T, U>, ) -> CornerRadius2D<T, U>
New with distinct values.
Sourcepub fn new_all(radius: Size2D<T, U>) -> CornerRadius2D<T, U>
pub fn new_all(radius: Size2D<T, U>) -> CornerRadius2D<T, U>
New all corners same radius.
Sourcepub fn zero() -> CornerRadius2D<T, U>
pub fn zero() -> CornerRadius2D<T, U>
All zeros.
Sourcepub fn inflate(self, offsets: SideOffsets2D<T, U>) -> CornerRadius2D<T, U>where
T: AddAssign,
pub fn inflate(self, offsets: SideOffsets2D<T, U>) -> CornerRadius2D<T, U>where
T: AddAssign,
Calculate the corner radius of an outer border around self
to perfectly fit.
Sourcepub fn deflate(self, offsets: SideOffsets2D<T, U>) -> CornerRadius2D<T, U>where
T: SubAssign + PartialOrd,
pub fn deflate(self, offsets: SideOffsets2D<T, U>) -> CornerRadius2D<T, U>where
T: SubAssign + PartialOrd,
Calculate the corner radius of an inner border inside self
to perfectly fit.
Trait Implementations
Source§impl<T, U> Clone for CornerRadius2D<T, U>where
T: Clone,
impl<T, U> Clone for CornerRadius2D<T, U>where
T: Clone,
Source§fn clone(&self) -> CornerRadius2D<T, U>
fn clone(&self) -> CornerRadius2D<T, U>
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<T, U> Debug for CornerRadius2D<T, U>where
T: Debug,
impl<T, U> Debug for CornerRadius2D<T, U>where
T: Debug,
Source§impl<T, U> Default for CornerRadius2D<T, U>where
T: Default,
impl<T, U> Default for CornerRadius2D<T, U>where
T: Default,
Source§fn default() -> CornerRadius2D<T, U>
fn default() -> CornerRadius2D<T, U>
Returns the “default value” for a type. Read more
Source§impl<'de, T, U> Deserialize<'de> for CornerRadius2D<T, U>where
T: Deserialize<'de>,
impl<'de, T, U> Deserialize<'de> for CornerRadius2D<T, U>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CornerRadius2D<T, U>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CornerRadius2D<T, U>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T, U> PartialEq for CornerRadius2D<T, U>where
T: PartialEq,
impl<T, U> PartialEq for CornerRadius2D<T, U>where
T: PartialEq,
Source§impl<T, U> Serialize for CornerRadius2D<T, U>where
T: Serialize,
impl<T, U> Serialize for CornerRadius2D<T, U>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<T, U> Transitionable for CornerRadius2D<T, U>
impl<T, U> Transitionable for CornerRadius2D<T, U>
Source§fn lerp(self, to: &CornerRadius2D<T, U>, step: Factor) -> CornerRadius2D<T, U>
fn lerp(self, to: &CornerRadius2D<T, U>, step: Factor) -> CornerRadius2D<T, U>
Sample the linear interpolation from
self
-> to
by step
.