C# Class SoundInTheory.DynamicImage.Filters.ImageMath

Show file Open project: sitdap/dynamic-image Class Usage Examples

Public Methods

Method Description
BilinearInterpolate ( double x, double y, Color nw, Color ne, Color sw, Color se ) : Color

Bilinear interpolation of ARGB values.

BilinearInterpolate ( float x, float y, int nw, int ne, int sw, int se ) : int

Bilinear interpolation of ARGB values.

Clamp ( int x, int a, int b ) : int

Clamps a value to an interval.

Mod ( double a, double b ) : double

Returns a mod b. This differs from the % operator with respect to negative numbers.

Mod ( int a, int b ) : int

Returns a mod b. This differs from the % operator with respect to negative numbers.

Method Details

BilinearInterpolate() public static method

Bilinear interpolation of ARGB values.
public static BilinearInterpolate ( double x, double y, Color nw, Color ne, Color sw, Color se ) : Color
x double The X interpolation parameter 0..1
y double The y interpolation parameter 0..1
nw Color
ne Color
sw Color
se Color
return Color

BilinearInterpolate() public static method

Bilinear interpolation of ARGB values.
public static BilinearInterpolate ( float x, float y, int nw, int ne, int sw, int se ) : int
x float The X interpolation parameter 0..1
y float The y interpolation parameter 0..1
nw int
ne int
sw int
se int
return int

Clamp() public static method

Clamps a value to an interval.
public static Clamp ( int x, int a, int b ) : int
x int The input parameter.
a int The lower clamp threshold.
b int The upper clamp threshold.
return int

Mod() public static method

Returns a mod b. This differs from the % operator with respect to negative numbers.
public static Mod ( double a, double b ) : double
a double The dividend.
b double The divisor.
return double

Mod() public static method

Returns a mod b. This differs from the % operator with respect to negative numbers.
public static Mod ( int a, int b ) : int
a int The dividend.
b int The divisor.
return int