C# Class Apachai.Effects.Core.Utility

Datei anzeigen Open project: garuma/apachai

Public Methods

Method Description
Clamp ( double x, double min, double max ) : double
Clamp ( float x, float min, float max ) : float
Clamp ( int x, int min, int max ) : int
ClampToByte ( double x ) : byte
ClampToByte ( float x ) : byte
ClampToByte ( int x ) : byte
ColorDifference ( PixelData a, PixelData b ) : int
ColorDifferenceSquared ( PixelData a, PixelData b ) : int
FastDivideShortByByte ( ushort n, byte d ) : int
FastScaleByteByByte ( byte a, byte b ) : byte
GetLinePoints ( Point first, Point second ) : Point[]
GetRegionBounds ( Rectangle rects, int startIndex, int length ) : Rectangle

Allows you to find the bounding box for a "region" that is described as an array of bounding boxes.

GetStaticName ( Type type ) : string
InflateRectangles ( Rectangle rects, int len ) : System.Drawing.Rectangle[]
Lerp ( double from, double to, double frac ) : double
Lerp ( float from, float to, float frac ) : float
RectanglesToRegion ( Rectangle rects ) : Region
Swap ( int &a, int &b ) : void

Private Methods

Method Description
IsNumber ( float x ) : bool

Method Details

Clamp() public static method

public static Clamp ( double x, double min, double max ) : double
x double
min double
max double
return double

Clamp() public static method

public static Clamp ( float x, float min, float max ) : float
x float
min float
max float
return float

Clamp() public static method

public static Clamp ( int x, int min, int max ) : int
x int
min int
max int
return int

ClampToByte() public static method

public static ClampToByte ( double x ) : byte
x double
return byte

ClampToByte() public static method

public static ClampToByte ( float x ) : byte
x float
return byte

ClampToByte() public static method

public static ClampToByte ( int x ) : byte
x int
return byte

ColorDifference() public static method

public static ColorDifference ( PixelData a, PixelData b ) : int
a System.Drawing.PixelData
b System.Drawing.PixelData
return int

ColorDifferenceSquared() public static method

public static ColorDifferenceSquared ( PixelData a, PixelData b ) : int
a System.Drawing.PixelData
b System.Drawing.PixelData
return int

FastDivideShortByByte() public static method

public static FastDivideShortByByte ( ushort n, byte d ) : int
n ushort
d byte
return int

FastScaleByteByByte() public static method

public static FastScaleByteByByte ( byte a, byte b ) : byte
a byte
b byte
return byte

GetLinePoints() public static method

public static GetLinePoints ( Point first, Point second ) : Point[]
first Point
second Point
return Point[]

GetRegionBounds() public static method

Allows you to find the bounding box for a "region" that is described as an array of bounding boxes.
public static GetRegionBounds ( Rectangle rects, int startIndex, int length ) : Rectangle
rects System.Drawing.Rectangle
startIndex int
length int
return System.Drawing.Rectangle

GetStaticName() public static method

public static GetStaticName ( Type type ) : string
type System.Type
return string

InflateRectangles() public static method

public static InflateRectangles ( Rectangle rects, int len ) : System.Drawing.Rectangle[]
rects System.Drawing.Rectangle
len int
return System.Drawing.Rectangle[]

Lerp() public static method

public static Lerp ( double from, double to, double frac ) : double
from double
to double
frac double
return double

Lerp() public static method

public static Lerp ( float from, float to, float frac ) : float
from float
to float
frac float
return float

RectanglesToRegion() public static method

public static RectanglesToRegion ( Rectangle rects ) : Region
rects System.Drawing.Rectangle
return System.Drawing.Region

Swap() public static method

public static Swap ( int &a, int &b ) : void
a int
b int
return void