pub struct ShapeMask {
pub shape: ShapeGeometry,
pub feather: Animated<f32>,
pub invert: bool,
pub mode: MaskMode,
pub fill_rule: FillRule,
}Expand description
A shape that limits where a clip is visible.
Geometry is in the clip’s source space before its transform, so the mask moves with the
clip: (0, 0) is the source’s top-left, (1, 1) its bottom-right. Distances (feather,
corner_radius, polystar radii) are fractions of that space’s shorter side.
Fields§
§shape: ShapeGeometryThe shape’s outline, as a shapes generator’s geometry.
feather: Animated<f32>Edge softness, non-negative; zero is the outline’s antialiased edge. Coverage is blurred
by a Gaussian with standard deviation 0.3125 * feather, a 10-90% ramp of 0.8 * feather.
invert: boolWhether the mask keeps the outside of the shape instead of its inside.
mode: MaskModeHow this mask combines with the ones before it.
fill_rule: FillRuleWhich regions of the outline are inside it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ShapeMask
impl<'de> Deserialize<'de> for ShapeMask
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
impl StructuralPartialEq for ShapeMask
Auto Trait Implementations§
impl Freeze for ShapeMask
impl RefUnwindSafe for ShapeMask
impl Send for ShapeMask
impl Sync for ShapeMask
impl Unpin for ShapeMask
impl UnsafeUnpin for ShapeMask
impl UnwindSafe for ShapeMask
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