C# Class Pinta.ImageManipulation.Utility

Exibir arquivo Open project: PintaProject/Pinta.ImageManipulation

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
FastDivideShortByByte ( ushort n, byte d ) : int
FastScaleByteByByte ( byte a, byte b ) : byte
GetBilinearSampleClamped ( ISurface src, float x, float y ) : ColorBgra
GetBilinearSampleWrapped ( ISurface src, ColorBgra srcDataPtr, int srcWidth, int srcHeight, float x, float y ) : ColorBgra
GetBilinearSampleWrapped ( ISurface src, float x, float y ) : ColorBgra
GetBlendModeOp ( BlendMode mode ) : UserBlendOp
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.

GetRgssOffsets ( PointD samplesArray, int sampleCount, int quality ) : void
Lerp ( PointD from, PointD to, float frac ) : PointD
Lerp ( double from, double to, double frac ) : double

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

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

GetBilinearSampleClamped() public static method

public static GetBilinearSampleClamped ( ISurface src, float x, float y ) : ColorBgra
src ISurface
x float
y float
return ColorBgra

GetBilinearSampleWrapped() public static method

public static GetBilinearSampleWrapped ( ISurface src, ColorBgra srcDataPtr, int srcWidth, int srcHeight, float x, float y ) : ColorBgra
src ISurface
srcDataPtr ColorBgra
srcWidth int
srcHeight int
x float
y float
return ColorBgra

GetBilinearSampleWrapped() public static method

public static GetBilinearSampleWrapped ( ISurface src, float x, float y ) : ColorBgra
src ISurface
x float
y float
return ColorBgra

GetBlendModeOp() public static method

public static GetBlendModeOp ( BlendMode mode ) : UserBlendOp
mode BlendMode
return UserBlendOp

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 Rectangle
startIndex int
length int
return Rectangle

GetRgssOffsets() public static method

public static GetRgssOffsets ( PointD samplesArray, int sampleCount, int quality ) : void
samplesArray PointD
sampleCount int
quality int
return void

Lerp() public static method

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

Lerp() public static method

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