pub enum ShapeRecipe {
Rect {
corner_radius: CornerRadius,
},
Pill,
Circle,
}Expand description
The outline a recipe paints into. Pill / Circle resolve their
corner radius against the bounding rect at paint time. CustomPath
is intentionally absent for now: the path-builder closure can’t be
Send + Sync + Serialize, and the IntUI default recipes don’t need
it. A future variant will land if app code grows the need.
Variants§
Rect
Axis-aligned rectangle with per-corner radii. Use
CornerRadius::uniform for a single-radius rounded rect.
Fields
§
corner_radius: CornerRadiusPill
corner_radius = min(width, height) / 2 — fully-rounded ends.
Circle
Force width == height and corner_radius = width / 2.
Implementations§
Trait Implementations§
Source§impl Clone for ShapeRecipe
impl Clone for ShapeRecipe
Source§fn clone(&self) -> ShapeRecipe
fn clone(&self) -> ShapeRecipe
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 ShapeRecipe
Source§impl Debug for ShapeRecipe
impl Debug for ShapeRecipe
Source§impl<'de> Deserialize<'de> for ShapeRecipe
impl<'de> Deserialize<'de> for ShapeRecipe
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
Source§impl PartialEq for ShapeRecipe
impl PartialEq for ShapeRecipe
Source§impl Serialize for ShapeRecipe
impl Serialize for ShapeRecipe
impl StructuralPartialEq for ShapeRecipe
Auto Trait Implementations§
impl Freeze for ShapeRecipe
impl RefUnwindSafe for ShapeRecipe
impl Send for ShapeRecipe
impl Sync for ShapeRecipe
impl Unpin for ShapeRecipe
impl UnsafeUnpin for ShapeRecipe
impl UnwindSafe for ShapeRecipe
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