pub struct CompositionMaskBrush(/* private fields */);Expand description
A brush that paints a source brush through the alpha of a mask brush
(WinUI Microsoft.UI.Composition.CompositionMaskBrush).
A colour or gradient mask is the opacity mask of the drawing context. A surface (or other composition) brush as the mask is painted over the source in a layer with the destination-in blending of bitmaps.
Deviation (winui-composition.md): a mask that is not a colour or gradient brush masks through the bitmaps it draws only (a loaded image surface); shapes drawn by a visual surface used as a mask do not mask.
Implementations§
Source§impl CompositionMaskBrush
impl CompositionMaskBrush
Sourcepub fn from_brush(brush: &Rc<CompositionBrush>) -> Option<CompositionMaskBrush>
pub fn from_brush(brush: &Rc<CompositionBrush>) -> Option<CompositionMaskBrush>
The handle of brush as a mask brush, if it is one.
Sourcepub fn props(&self) -> &CompositionMaskBrushProps
pub fn props(&self) -> &CompositionMaskBrushProps
The generated properties of the brush.
Sourcepub fn source(&self) -> Option<Rc<CompositionBrush>>
pub fn source(&self) -> Option<Rc<CompositionBrush>>
The brush that is painted.
pub fn set_source(&self, value: Option<Rc<CompositionBrush>>)
Sourcepub fn mask(&self) -> Option<Rc<CompositionBrush>>
pub fn mask(&self) -> Option<Rc<CompositionBrush>>
The brush whose alpha masks the source.
pub fn set_mask(&self, value: Option<Rc<CompositionBrush>>)
Trait Implementations§
Source§impl Clone for CompositionMaskBrush
impl Clone for CompositionMaskBrush
Source§impl Deref for CompositionMaskBrush
impl Deref for CompositionMaskBrush
Source§type Target = Rc<CompositionBrush>
type Target = Rc<CompositionBrush>
The resulting type after dereferencing.
Source§fn deref(&self) -> &Rc<CompositionBrush>
fn deref(&self) -> &Rc<CompositionBrush>
Dereferences the value.
Auto Trait Implementations§
impl !RefUnwindSafe for CompositionMaskBrush
impl !Send for CompositionMaskBrush
impl !Sync for CompositionMaskBrush
impl !UnwindSafe for CompositionMaskBrush
impl Freeze for CompositionMaskBrush
impl Unpin for CompositionMaskBrush
impl UnsafeUnpin for CompositionMaskBrush
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more