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: Copy + Zero, U> CornerRadius2D<T, U>
impl<T: Copy + Zero, 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>,
) -> Self
pub fn new( top_left: Size2D<T, U>, top_right: Size2D<T, U>, bottom_right: Size2D<T, U>, bottom_left: Size2D<T, U>, ) -> Self
New with distinct values.
Sourcepub fn inflate(self, offsets: SideOffsets2D<T, U>) -> Selfwhere
T: AddAssign,
pub fn inflate(self, offsets: SideOffsets2D<T, U>) -> Selfwhere
T: AddAssign,
Calculate the corner radius of an outer border around self
to perfectly fit.
Sourcepub fn deflate(self, offsets: SideOffsets2D<T, U>) -> Selfwhere
T: SubAssign + PartialOrd,
pub fn deflate(self, offsets: SideOffsets2D<T, U>) -> Selfwhere
T: SubAssign + PartialOrd,
Calculate the corner radius of an inner border inside self
to perfectly fit.
Trait Implementations§
Source§impl DipToPx for DipCornerRadius
impl DipToPx for DipCornerRadius
Source§impl<T: Clone, U> Clone for CornerRadius2D<T, U>
impl<T: Clone, U> Clone for CornerRadius2D<T, U>
Source§impl<T: Debug, U> Debug for CornerRadius2D<T, U>
impl<T: Debug, U> Debug for CornerRadius2D<T, U>
Source§impl<T: Default, U> Default for CornerRadius2D<T, U>
impl<T: Default, U> Default for CornerRadius2D<T, U>
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more