FairyGUI.ColorFilter.AdjustContrast C# (CSharp) Method

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
        public void AdjustContrast(float value)
        {
            float s = value + 1;
            float o = 128f / 255 * (1 - s);

            ConcatValues(s, 0, 0, 0, o,
                         0, s, 0, 0, o,
                         0, 0, s, 0, o,
                         0, 0, 0, 1, 0);
        }

Usage Example

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