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 corner and (1, 1)
its bottom-right. Distances (feather, a rectangle’s corner_radius, a
polystar’s radii) are fractions of that space’s shorter side, so a mask
covers the same part of the picture at any render resolution.
Fields§
§shape: ShapeGeometryThe shape’s outline, as a shapes generator’s geometry.
feather: Animated<f32>How soft the edge is. Non-negative; zero is the outline’s
antialiased edge. The coverage is blurred by a Gaussian of standard
deviation 0.3125 * feather, which spreads its 10 to 90 percent ramp
over 0.8 * feather across the outline.
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.