ColorFilter
Namespace:FairyGUI
Source:Assets/Scripts/Filter/ColorFilter.cs (line 10)
public class ColorFilter : IFilter
Interfaces:IFilter
Constructors
ColorFilter()
public ColorFilter();
Source:Filter/ColorFilter.cs (line 24)
Methods
AdjustBrightness(float)
public void AdjustBrightness(float value);
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.
| Parameter | Type | Description |
|---|---|---|
value | float |
Source:Filter/ColorFilter.cs (line 120)
AdjustContrast(float)
public void AdjustContrast(float value);
Changes the contrast. Typical values are in the range (-1, 1). Values above zero will raise, values below zero will reduce the contrast.
| Parameter | Type | Description |
|---|---|---|
value | float |
Source:Filter/ColorFilter.cs (line 104)
AdjustHue(float)
public void AdjustHue(float value);
Changes the hue of the image. Typical values are in the range (-1, 1).
| Parameter | Type | Description |
|---|---|---|
value | float |
Source:Filter/ColorFilter.cs (line 132)
AdjustSaturation(float)
public void AdjustSaturation(float sat);
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.
| Parameter | Type | Description |
|---|---|---|
sat | float |
Source:Filter/ColorFilter.cs (line 84)
ConcatValues(float[])
public void ConcatValues(params float[] values);
| Parameter | Type | Description |
|---|---|---|
values | float[] |
Source:Filter/ColorFilter.cs (line 194)
Dispose()
public void Dispose();
Source:Filter/ColorFilter.cs (line 50)
Invert()
public void Invert();
Source:Filter/ColorFilter.cs (line 70)
Reset()
public void Reset();
Changes the filter matrix back to the identity matrix
Source:Filter/ColorFilter.cs (line 167)
Tint(Color, float)
public void Tint(Color color, float amount = 1.0f);
Tints the image in a certain color, analog to what can be done in Adobe Animate.
| Parameter | Type | Description |
|---|---|---|
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). |
Source:Filter/ColorFilter.cs (line 150)
Update()
public void Update();
Source:Filter/ColorFilter.cs (line 66)
Properties
target
public DisplayObject target { get; set; }
Source:Filter/ColorFilter.cs (line 30)