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
fromColorBgraThe color value that represents 0 on the lerp number line.
toColorBgraThe color value that represents 1 on the lerp number line.
fracfloatA value in the range [0, 1].
Returns
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
Returns
Lerp(ColorBgra, ColorBgra, double)
Linearly interpolates between two color values.
public static ColorBgra Lerp(ColorBgra from, ColorBgra to, double frac)
Parameters
fromColorBgraThe color value that represents 0 on the lerp number line.
toColorBgraThe color value that represents 1 on the lerp number line.
fracdoubleA value in the range [0, 1].
Returns
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.