C# Class Imager.Interface.OutOfBoundsUtils

Mostra file Open project: soywiz/cspspemu Class Usage Examples

Public Methods

Method Description
GetBoundsCheckedCoordinate ( int index, int count, OutOfBoundsHandler handler ) : int

Checks coordinates for over-/underflow and does the correction based on the given OutOfBoundsMode.

GetBoundsCheckedCoordinate ( int index, int count, OutOfBoundsMode mode ) : int

Checks coordinates for over-/underflow and does the correction based on the given OutOfBoundsMode.

GetHandlerOrCrash ( OutOfBoundsMode mode ) : OutOfBoundsHandler

Gets the out of bounds handler or crashes.

Private Methods

Method Description
_ConstantExtension ( int index, int count, bool overflow, bool underflow ) : int
_HalfSampleSymmetric ( int index, int count, bool overflow, bool underflow ) : int
_WholeSampleSymmetric ( int index, int count, bool overflow, bool underflow ) : int
_WrapAround ( int index, int count, bool overflow, bool underflow ) : int

Method Details

GetBoundsCheckedCoordinate() public static method

Checks coordinates for over-/underflow and does the correction based on the given OutOfBoundsMode.
public static GetBoundsCheckedCoordinate ( int index, int count, OutOfBoundsHandler handler ) : int
index int The coordinate index.
count int The sample count.
handler OutOfBoundsHandler The handler.
return int

GetBoundsCheckedCoordinate() public static method

Checks coordinates for over-/underflow and does the correction based on the given OutOfBoundsMode.
public static GetBoundsCheckedCoordinate ( int index, int count, OutOfBoundsMode mode ) : int
index int The coordinate index.
count int The sample count.
mode OutOfBoundsMode The mode.
return int

GetHandlerOrCrash() public static method

Gets the out of bounds handler or crashes.
public static GetHandlerOrCrash ( OutOfBoundsMode mode ) : OutOfBoundsHandler
mode OutOfBoundsMode The mode.
return OutOfBoundsHandler