FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ReactiveGridShaderEffect

    struct · ferroui-base · v0.5.0

    struct ReactiveGridShaderEffect
    

    Grid lines over the content and a halo under the pointer (Effector's ReactiveGridShaderEffect): lines 5 percent of the cell wide along the top and the left of each cell of cell-size (clamped to 8..64) from the top left corner of the area, at the opacity strength * 0.45 (strength clamped to 0..1), and, while the pointer is over the host or pressed, a halo around (pointer-x, pointer-y) fading to nothing at 0.18 of the area (0.28 while pressed), at the opacity 0.18 plus press-boost while pressed; all times the colour and the alpha of the content, drawn source over the content.

    reactive-grid(cell-size=22, strength=0.24, color=#64D6FF). An overlay shader effect masked by the content; without strength and the pointer away (the neutral value) the content is unchanged. InteractiveReactiveGridEffect follows the pointer.

    View source

    Members

    pointer_x

    pointer_x: f64
    

    The horizontal position of the pointer, 0 (left) to 1 (right) (default 0.5).

    Source

    pointer_y

    pointer_y: f64
    

    The vertical position of the pointer, 0 (top) to 1 (bottom) (default 0.5).

    Source

    is_pointer_over

    is_pointer_over: bool
    

    Whether the pointer is over the host (default false).

    Source

    is_pressed

    is_pressed: bool
    

    Whether the pointer is pressed (default false).

    Source

    cell_size

    cell_size: f64
    

    The side of a cell, in device independent pixels (default 22).

    Source

    strength

    strength: f64
    

    The strength of the lines, 0 to 1 (default 0.24).

    Source

    press_boost

    press_boost: f64
    

    The opacity the halo gains while pressed, 0 to 1 (default 0.36).

    Source

    color

    color: crate::media::Color
    

    The colour of the lines and the halo (default #64D6FF).

    Source

    LINE_WIDTH

    const LINE_WIDTH: f32
    

    The width of a line, a fraction of the side of a cell (Effector's gridX < 0.05).

    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.