pub enum ClipPath {
None,
Inset {
top: f32,
right: f32,
bottom: f32,
left: f32,
border_radius: f32,
},
Circle {
radius: f32,
center_x: f32,
center_y: f32,
},
Ellipse {
radius_x: f32,
radius_y: f32,
center_x: f32,
center_y: f32,
},
Polygon(Vec<Point<f32>>),
Path(String),
}Expand description
CSS clip-path geometric masking shape.
Variants§
None
Inset
Inset rectangular clip mask with optional rounded corners.
Circle
Circular clip mask with radius and center coordinates.
Ellipse
Elliptical clip mask with x/y radii and center coordinates.
Polygon(Vec<Point<f32>>)
Polygon mask defined by a sequence of 2D boundary vertices.
Path(String)
Arbitrary SVG path string.
Implementations§
Source§impl ClipPath
impl ClipPath
pub fn inset( top: f32, right: f32, bottom: f32, left: f32, border_radius: f32, ) -> Self
pub fn circle(radius: f32, center_x: f32, center_y: f32) -> Self
pub fn ellipse( radius_x: f32, radius_y: f32, center_x: f32, center_y: f32, ) -> Self
pub fn polygon(vertices: Vec<Point<f32>>) -> Self
pub fn path(path_str: impl Into<String>) -> Self
pub fn is_none(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for ClipPath
Auto Trait Implementations§
impl Forget for ClipPath
impl Freeze for ClipPath
impl Move for ClipPath
impl RefUnwindSafe for ClipPath
impl Send for ClipPath
impl Sync for ClipPath
impl Unpin for ClipPath
impl UnsafeUnpin for ClipPath
impl UnwindSafe for ClipPath
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