跳到主要内容

ColorFilter

命名空间:FairyGUI
源码:Assets/Scripts/Filter/ColorFilter.cs (行 10)

public class ColorFilter : IFilter

接口:IFilter

构造函数​

ColorFilter()​

public ColorFilter();

源码:Filter/ColorFilter.cs (行 24)

方法​

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.

参数类型说明
valuefloat

源码:Filter/ColorFilter.cs (行 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.

参数类型说明
valuefloat

源码:Filter/ColorFilter.cs (行 104)

AdjustHue(float)​

public void AdjustHue(float value);

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

参数类型说明
valuefloat

源码:Filter/ColorFilter.cs (行 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.

参数类型说明
satfloat

源码:Filter/ColorFilter.cs (行 84)

ConcatValues(float[])​

public void ConcatValues(params float[] values);
参数类型说明
valuesfloat[]

源码:Filter/ColorFilter.cs (行 194)

Dispose()​

public void Dispose();

源码:Filter/ColorFilter.cs (行 50)

Invert()​

public void Invert();

源码:Filter/ColorFilter.cs (行 70)

Reset()​

public void Reset();

Changes the filter matrix back to the identity matrix

源码:Filter/ColorFilter.cs (行 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.

参数类型说明
colorColorthe RGB color with which the image should be tinted.
amountfloatthe intensity with which tinting should be applied. Range (0, 1).

源码:Filter/ColorFilter.cs (行 150)

Update()​

public void Update();

源码:Filter/ColorFilter.cs (行 66)

属性​

target​

public DisplayObject target { get; set; }

源码:Filter/ColorFilter.cs (行 30)