pub struct ShapeMask {
pub shape: MaskShape,
pub center: Animated<Vec2>,
pub size: Animated<Vec2>,
pub rotation_degrees: Animated<f32>,
pub feather: Animated<f32>,
pub invert: bool,
pub mode: MaskMode,
}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 corner and (1, 1)
its bottom-right. Distances (feather, a rectangle’s corner_radius) are
fractions of that space’s shorter side, so a mask covers the same part of
the picture at any render resolution.
Fields§
§shape: MaskShapeThe shape’s outline.
center: Animated<Vec2>Centre of the shape.
size: Animated<Vec2>Full width and height of the shape, before rotation. Non-negative.
rotation_degrees: Animated<f32>Clockwise rotation about the centre, in degrees.
feather: Animated<f32>Width of the soft edge, centred on the outline. Non-negative; zero is a one-pixel antialiased edge.
invert: boolWhether the mask keeps the outside of the shape instead of its inside.
mode: MaskModeHow this mask combines with the ones before 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