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
ColorBgraThe color value that represents 0 on the lerp number line.
to
ColorBgraThe color value that represents 1 on the lerp number line.
frac
floatA 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
from
ColorBgraThe color value that represents 0 on the lerp number line.
to
ColorBgraThe color value that represents 1 on the lerp number line.
frac
doubleA 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.