pub enum VnClipPath {
None,
Box(VnClipBox),
Inset {
reference: VnClipBox,
insets: [DefiniteLength; 4],
radii: [VnCornerRadius; 4],
},
Ellipse {
reference: VnClipBox,
center: [DefiniteLength; 2],
radius: [VnShapeRadius; 2],
circle: bool,
},
Polygon {
reference: VnClipBox,
fill_rule: VnFillRule,
points: Arc<[[DefiniteLength; 2]]>,
},
Path {
reference: VnClipBox,
fill_rule: VnFillRule,
verbs: Arc<[VnPathVerb]>,
},
}Expand description
vue-native fork: CSS clip-path (CSS Masking 1 §5). The shapes a rounded
content mask can carry are one (Style::vn_clip_mask); polygon(),
path() and an ellipse that is no circle are an isolated layer composited
through the shape (Style::vn_clip_outline, crate::VnClipGeometry).
Variants§
None
none: no clip.
Box(VnClipBox)
A <geometry-box> alone: that box, rounded as border-radius rounds
it.
Inset
inset(): the reference box less insets, with radii (round).
A percentage inset is of the box’s width (left and right) or height
(top and bottom), and a percentage radius of the box’s size, as
Chromium resolves them.
Fields
insets: [DefiniteLength; 4]The insets: top, right, bottom, left.
radii: [VnCornerRadius; 4]The round radii: top left, top right, bottom right, bottom
left. Zero for a square corner.
Ellipse
circle(), or ellipse(): a centre in the reference box and two
radii. A circle is a rounded mask; an ellipse whose radii differ is
its outline, four cubics, in an isolated layer. Both are exact.
Fields
center: [DefiniteLength; 2]The centre, from the reference box’s top left corner: x, y.
radius: [VnShapeRadius; 2]The horizontal and vertical radii; the same for a circle.
Polygon
polygon(): its vertices, x and y from the reference box’s top left
corner, a percentage of its width and height.
Fields
fill_rule: VnFillRulenonzero or evenodd.
points: Arc<[[DefiniteLength; 2]]>The vertices, in order.
Path
path(): SVG path data, in pixels from the reference box’s top left
corner (CSS Shapes 1 §3.1).
Fields
fill_rule: VnFillRulenonzero or evenodd.
verbs: Arc<[VnPathVerb]>The path, absolute (VnPathVerb).
Trait Implementations§
Source§impl Clone for VnClipPath
impl Clone for VnClipPath
Source§impl Debug for VnClipPath
impl Debug for VnClipPath
Source§impl Default for VnClipPath
impl Default for VnClipPath
Source§impl<'de> Deserialize<'de> for VnClipPath
impl<'de> Deserialize<'de> for VnClipPath
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>,
Source§impl PartialEq for VnClipPath
impl PartialEq for VnClipPath
Source§impl Serialize for VnClipPath
impl Serialize for VnClipPath
impl StructuralPartialEq for VnClipPath
Auto Trait Implementations§
impl Forget for VnClipPath
impl Freeze for VnClipPath
impl Move for VnClipPath
impl RefUnwindSafe for VnClipPath
impl Send for VnClipPath
impl Sync for VnClipPath
impl Unpin for VnClipPath
impl UnsafeUnpin for VnClipPath
impl UnwindSafe for VnClipPath
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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