pub struct MaskSpec {
pub shape: MaskShape,
pub radius: f64,
pub feather: f64,
pub invert: bool,
pub x: f64,
pub y: f64,
pub w: f64,
pub h: f64,
}Expand description
A resolved soft-mask applied to a node’s draws.
The mask coverage is the shape inscribed in the node box [x, y, w, h]
(page-absolute pixels), optionally with a corner radius (RoundedRect),
a Gaussian feather sigma (>= 0), and an invert flag. The renderer
brackets the node’s draws with SceneCommand::BeginMask /
SceneCommand::EndMask and composites the captured ink through the
feathered coverage.
Fields§
§shape: MaskShape§radius: f64Resolved corner radius in pixels (RoundedRect; 0.0 otherwise).
feather: f64Gaussian feather sigma in pixels (>= 0).
invert: bool§x: f64Node box, page-absolute pixels.
y: f64§w: f64§h: f64Trait Implementations§
impl Copy for MaskSpec
impl StructuralPartialEq for MaskSpec
Auto Trait Implementations§
impl Freeze for MaskSpec
impl RefUnwindSafe for MaskSpec
impl Send for MaskSpec
impl Sync for MaskSpec
impl Unpin for MaskSpec
impl UnsafeUnpin for MaskSpec
impl UnwindSafe for MaskSpec
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