C# Class SparrowSharp.Filters.ColorMatrixFilter

Inheritance: FragmentFilter
Datei anzeigen Open project: fmotagarcia/sparrow-sharp Class Usage Examples

Public Properties

Property Type Description
ColorMatrix ColorMatrix

Public Methods

Method Description
AdjustBrightness ( float brightness ) : void

Changes the brightness. Typical values are in the range(-1, 1). Values above zero will make the image brighter, values below zero will make it darker.

AdjustContrast ( float contrast ) : void

Changes the contrast. Typical values are in the range(-1, 1). Values above zero will raise, values below zero will reduce the contrast.

AdjustHue ( float hue ) : void

Changes the hue of the image. Typical values are in the range(-1, 1).

AdjustSaturation ( float saturation ) : void

Changes the saturation. Typical values are in the range(-1, 1). Values above zero will raise, values below zero will reduce the saturation. '-1' will produce a grayscale image.

ColorMatrixFilter ( ColorMatrix matrix = null ) : Sparrow.Core
ConcatColorMatrix ( ColorMatrix colorMatrix ) : void

Concatenates the current matrix with another one.

Invert ( ) : void

Inverts the colors of the filtered objects.

Reset ( ) : void

Changes the filter matrix back to the identity matrix.

Protected Methods

Method Description
ActivateWithPass ( int pass, Sparrow texture, Sparrow mvpMatrix ) : void
CreatePrograms ( ) : void

Private Methods

Method Description
GetFragmentShader ( ) : string
UpdateShaderMatrix ( ) : void

Method Details

ActivateWithPass() protected method

protected ActivateWithPass ( int pass, Sparrow texture, Sparrow mvpMatrix ) : void
pass int
texture Sparrow
mvpMatrix Sparrow
return void

AdjustBrightness() public method

Changes the brightness. Typical values are in the range(-1, 1). Values above zero will make the image brighter, values below zero will make it darker.
public AdjustBrightness ( float brightness ) : void
brightness float
return void

AdjustContrast() public method

Changes the contrast. Typical values are in the range(-1, 1). Values above zero will raise, values below zero will reduce the contrast.
public AdjustContrast ( float contrast ) : void
contrast float
return void

AdjustHue() public method

Changes the hue of the image. Typical values are in the range(-1, 1).
public AdjustHue ( float hue ) : void
hue float
return void

AdjustSaturation() public method

Changes the saturation. Typical values are in the range(-1, 1). Values above zero will raise, values below zero will reduce the saturation. '-1' will produce a grayscale image.
public AdjustSaturation ( float saturation ) : void
saturation float
return void

ColorMatrixFilter() public method

public ColorMatrixFilter ( ColorMatrix matrix = null ) : Sparrow.Core
matrix ColorMatrix
return Sparrow.Core

ConcatColorMatrix() public method

Concatenates the current matrix with another one.
public ConcatColorMatrix ( ColorMatrix colorMatrix ) : void
colorMatrix ColorMatrix
return void

CreatePrograms() protected method

protected CreatePrograms ( ) : void
return void

Invert() public method

Inverts the colors of the filtered objects.
public Invert ( ) : void
return void

Reset() public method

Changes the filter matrix back to the identity matrix.
public Reset ( ) : void
return void

Property Details

ColorMatrix public_oe property

The color matrix object used to apply the filter.
public ColorMatrix,SparrowSharp.Filters ColorMatrix
return ColorMatrix