FairyGUI.ColorFilter.AdjustHue C# (CSharp) Method

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
        public void AdjustHue(float value)
        {
            value *= Mathf.PI;

            float cos = Mathf.Cos(value);
            float sin = Mathf.Sin(value);

            ConcatValues(
                ((LUMA_R + (cos * (1 - LUMA_R))) + (sin * -(LUMA_R))), ((LUMA_G + (cos * -(LUMA_G))) + (sin * -(LUMA_G))), ((LUMA_B + (cos * -(LUMA_B))) + (sin * (1 - LUMA_B))), 0, 0,
                ((LUMA_R + (cos * -(LUMA_R))) + (sin * 0.143f)), ((LUMA_G + (cos * (1 - LUMA_G))) + (sin * 0.14f)), ((LUMA_B + (cos * -(LUMA_B))) + (sin * -0.283f)), 0, 0,
                ((LUMA_R + (cos * -(LUMA_R))) + (sin * -((1 - LUMA_R)))), ((LUMA_G + (cos * -(LUMA_G))) + (sin * LUMA_G)), ((LUMA_B + (cos * (1 - LUMA_B))) + (sin * LUMA_B)), 0, 0,
                0, 0, 0, 1, 0);
        }

Usage Example

示例#1
0
 static public int AdjustHue(IntPtr l)
 {
     try {
         FairyGUI.ColorFilter self = (FairyGUI.ColorFilter)checkSelf(l);
         System.Single        a1;
         checkType(l, 2, out a1);
         self.AdjustHue(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.ColorFilter::AdjustHue