C# Class FairyGUI.ColorFilter

Inheritance: IFilter
显示文件 Open project: fairygui/FairyGUI-unity Class Usage Examples

Public Methods

Method Description
AdjustBrightness ( float value ) : 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 value ) : 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 value ) : void

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

AdjustSaturation ( float sat ) : 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.

ColorFilter ( ) : System
ConcatValues ( ) : void

Dispose ( ) : void
Invert ( ) : void
Reset ( ) : void

Changes the filter matrix back to the identity matrix

Tint ( Color color, float amount = 1.0f ) : void

Tints the image in a certain color, analog to what can be done in Adobe Animate.

Update ( ) : void

Private Methods

Method Description
UpdateMatrix ( ) : void

Method Details

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 value ) : void
value 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 value ) : void
value float
return void

AdjustHue() public method

Changes the hue of the image. Typical values are in the range (-1, 1).
public AdjustHue ( float value ) : void
value 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 sat ) : void
sat float
return void

ColorFilter() public method

public ColorFilter ( ) : System
return System

ConcatValues() public method

public ConcatValues ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

Invert() public method

public Invert ( ) : void
return void

Reset() public method

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

Tint() public method

Tints the image in a certain color, analog to what can be done in Adobe Animate.
public Tint ( Color color, float amount = 1.0f ) : void
color Color the RGB color with which the image should be tinted.
amount float the intensity with which tinting should be applied. Range (0, 1).
return void

Update() public method

public Update ( ) : void
return void