FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    LinearTransferEffect

    struct · ferroui-base · v0.5.0

    struct LinearTransferEffect
    

    Maps each channel of its source through a line, slope * c + offset (Win2D LinearTransferEffect): a colour matrix that scales each channel and adds an offset. A disabled channel is kept as it is. Animatable: RedSlope, RedOffset, GreenSlope, GreenOffset, BlueSlope, BlueOffset, AlphaSlope, AlphaOffset.

    View source

    Members

    name

    name: String
    

    The name of the effect.

    Source

    red_offset

    red_offset: f32
    

    The offset of red (default 0).

    Source

    red_slope

    red_slope: f32
    

    The slope of red (default 1).

    Source

    red_disable

    red_disable: bool
    

    Whether red is kept as it is (default false).

    Source

    green_offset

    green_offset: f32
    

    The offset of green (default 0).

    Source

    green_slope

    green_slope: f32
    

    The slope of green (default 1).

    Source

    green_disable

    green_disable: bool
    

    Whether green is kept as it is (default false).

    Source

    blue_offset

    blue_offset: f32
    

    The offset of blue (default 0).

    Source

    blue_slope

    blue_slope: f32
    

    The slope of blue (default 1).

    Source

    blue_disable

    blue_disable: bool
    

    Whether blue is kept as it is (default false).

    Source

    alpha_offset

    alpha_offset: f32
    

    The offset of alpha (default 0).

    Source

    alpha_slope

    alpha_slope: f32
    

    The slope of alpha (default 1).

    Source

    alpha_disable

    alpha_disable: bool
    

    Whether alpha is kept as it is (default false).

    Source

    alpha_mode

    alpha_mode: crate::media::ColorMatrixAlphaMode
    

    Whether the lines apply to premultiplied or straight colours (default premultiplied: the colour is un-premultiplied first).

    Source

    clamp_output

    clamp_output: bool
    

    Whether the output is clamped (stored; the drawing contexts clamp).

    Source

    source

    source: Option<GraphicsEffectSource>
    

    The input.

    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
    • From<LinearTransferEffect>
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Default

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.