FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SpotlightShaderEffect

    struct · ferroui-base · v0.5.0

    struct SpotlightShaderEffect
    

    A coloured light screened over the content (Effector's SpotlightShaderEffect): around the point (center-x, center-y) of the area (fractions of its width and height, clamped to 0..1), fading linearly to nothing at the distance radius (a fraction of the area, measured in the fractions of each axis, clamped to 0.05..1), the colour at the opacity strength (clamped to 0..1) times its own at the centre, times the alpha of the content.

    spotlight(center-x=0.55, center-y=0.4, radius=0.42, strength=0.35, color=#FFD26B). An overlay shader effect with the blend mode Screen, masked by the content; a strength of 0 (the neutral value) leaves the content unchanged.

    View source

    Members

    center_x

    center_x: f64
    

    The horizontal position of the centre, 0 (left) to 1 (right) (default 0.55).

    Source

    center_y

    center_y: f64
    

    The vertical position of the centre, 0 (top) to 1 (bottom) (default 0.4).

    Source

    radius

    radius: f64
    

    Where the light ends, a fraction of the area (default 0.42).

    Source

    strength

    strength: f64
    

    The opacity of the light at its centre, 0 to 1 (default 0.35).

    Source

    color

    color: crate::media::Color
    

    The colour of the light (default #FFD26B).

    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.