BrightnessContrastEffect
struct · ferroui-base · v0.5.0
struct BrightnessContrastEffect
Changes the brightness and the contrast of the content (Effector's
BrightnessContrastEffect): each colour channel c becomes
contrast * c + (1 - contrast) / 2 + brightness, the brightness clamped
to -1..1 and the contrast to 0..2.5; the alpha is kept.
brightness-contrast(brightness=0.1, contrast=1.3). The graph is a
linear transfer (Transfer.RedSlope, Transfer.RedOffset, ...).
Members
brightness
brightness: f64
The brightness added, -1 to 1 (default 0).
contrast
contrast: f64
The contrast, 0 (grey) to 2.5, 1 unchanged (default 1).
MAXIMUM_CONTRAST
const MAXIMUM_CONTRAST: f64
The largest contrast.
matrix
fn matrix(self: &Self) -> ColorMatrix
The colour matrix 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.