FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    EdgeDetectEffect

    struct · ferroui-base · v0.5.0

    struct EdgeDetectEffect
    

    Finds the edges of the content: the 3 by 3 Laplacian kernel of Effector's EdgeDetectEffect, [-s, -s, -s; -s, 8 s, -s; -s, -s, -s] with s the strength clamped to 0..2, applied to the colours un-premultiplied with the alpha kept: flat areas turn black, edges keep the change of colour across them.

    Deviation from Effector, which lays a black line of the response of a grey copy over the content: that uses the content twice, which a graph around the content of a visual does not (custom-effects.md, section 3.3); here the response is the output. There is no neutral value (a transition from no effect switches at half way).

    edge-detect(strength=1). The graph is a convolution (Edges.KernelMatrix0 to Edges.KernelMatrix8).

    View source

    Members

    strength

    strength: f64
    

    How strong the response is, 0 to 2 (default 1).

    Source

    kernel

    fn kernel(self: &Self) -> [f32; 9]
    

    The kernel, row by row.

    Source

    convolution

    fn convolution(self: &Self) -> ConvolveMatrix
    

    The convolution of the effect.

    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.