FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SharpenEffect

    struct · ferroui-base · v0.5.0

    struct SharpenEffect
    

    Sharpens the content (Effector's SharpenEffect): the 3 by 3 kernel [0, -s, 0; -s, 1 + 4 s, -s; 0, -s, 0] with s the strength clamped to 0..2, the four premultiplied channels convolved, transparent beyond the edges.

    sharpen(strength=1). The graph is a convolution (Win2D's ConvolveMatrixEffect, Sharpen.KernelMatrix0 to Sharpen.KernelMatrix8), whose kernel steps over device pixels.

    View source

    Members

    strength

    strength: f64
    

    How much, 0 (unchanged) 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.