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).
Members
strength
strength: f64
How strong the response is, 0 to 2 (default 1).
kernel
fn kernel(self: &Self) -> [f32; 9]
The kernel, row by row.
convolution
fn convolution(self: &Self) -> ConvolveMatrix
The convolution of the effect.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDebugStructuralPartialEqPartialEqDefaultCustomEffect
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.