FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompositionMaskBrush

    struct · ferroui-base · v0.5.0

    struct CompositionMaskBrush
    

    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.

    View source

    Members

    from_brush

    fn from_brush(brush: &Rc<CompositionBrush>) -> Option<CompositionMaskBrush>
    

    The handle of brush as a mask brush, if it is one.

    Source

    source

    fn source(self: &Self) -> Option<Rc<CompositionBrush>>
    

    The brush that is painted.

    Source

    set_source

    fn set_source(self: &Self, value: Option<Rc<CompositionBrush>>)
    

    Source

    mask

    fn mask(self: &Self) -> Option<Rc<CompositionBrush>>
    

    The brush whose alpha masks the source.

    Source

    set_mask

    fn set_mask(self: &Self, value: Option<Rc<CompositionBrush>>)
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Receiver
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Deref

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.