Table of Contents

Method Lerp

Namespace
PaintDotNet
Assembly
PaintDotNet.Core.dll

Lerp(ColorBgra, ColorBgra, float)

Linearly interpolates between two color values.

public static ColorBgra Lerp(ColorBgra from, ColorBgra to, float frac)

Parameters

from ColorBgra

The color value that represents 0 on the lerp number line.

to ColorBgra

The color value that represents 1 on the lerp number line.

frac float

A value in the range [0, 1].

Returns

ColorBgra

Remarks

This method does a simple lerp on each color value and on the alpha channel. It does not properly take into account the alpha channel's effect on color blending.

Lerp(ColorBgra, ColorBgra, byte)

public static ColorBgra Lerp(ColorBgra from, ColorBgra to, byte frac)

Parameters

from ColorBgra
to ColorBgra
frac byte

Returns

ColorBgra

Lerp(ColorBgra, ColorBgra, double)

Linearly interpolates between two color values.

public static ColorBgra Lerp(ColorBgra from, ColorBgra to, double frac)

Parameters

from ColorBgra

The color value that represents 0 on the lerp number line.

to ColorBgra

The color value that represents 1 on the lerp number line.

frac double

A value in the range [0, 1].

Returns

ColorBgra

Remarks

This method does a simple lerp on each color value and on the alpha channel. It does not properly take into account the alpha channel's effect on color blending.