FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MaskTransitionEffect

    struct · ferroui-base · v0.5.0

    struct MaskTransitionEffect
    

    Reveals a page over the content through a mask (the reveal of Effector's dissolve, with the content as the page that leaves): to-page is drawn where the luminance of mask (premultiplied) is below the threshold progress * (1 + softness), fading in over softness of luminance (clamped to 0.001..1); progress is clamped to 0..1, so 0 shows the content and 1 the page. The page and the mask are stretched over the area. A horizontal gradient as the mask is a wipe, a noise a dissolve; without a mask the page fades in (fully at a progress of softness / (1 + softness)).

    mask-transition(progress=0.5, softness=0.1), the images set from code. An overlay shader effect with two children, drawn source over the content; a progress of 0 (the neutral value) leaves the content unchanged.

    View source

    Members

    to_page

    to_page: super::super::EffectImage
    

    The page the transition reveals.

    Source

    mask

    mask: super::super::EffectImage
    

    The mask: dark parts are revealed first.

    Source

    progress

    progress: f64
    

    How far the transition is, 0 to 1 (default 0.5).

    Source

    softness

    softness: f64
    

    The width of the soft edge, in luminance, 0.001 to 1 (default 0.1).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Default
    • CustomEffect

    Availability

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