FairyGUI.NGraphics.Fill C# (CSharp) Method

Fill() public method

public Fill ( FillMethod method, float amount, int origin, bool clockwise, Rect vertRect, Rect uvRect ) : void
method FillMethod
amount float
origin int
clockwise bool
vertRect UnityEngine.Rect
uvRect UnityEngine.Rect
return void
        public void Fill(FillMethod method, float amount, int origin, bool clockwise, Rect vertRect, Rect uvRect)
        {
            amount = Mathf.Clamp01(amount);
            switch (method)
            {
                case FillMethod.Horizontal:
                    Alloc(4);
                    FillUtils.FillHorizontal((OriginHorizontal)origin, amount, vertRect, uvRect, vertices, uv);
                    break;

                case FillMethod.Vertical:
                    Alloc(4);
                    FillUtils.FillVertical((OriginVertical)origin, amount, vertRect, uvRect, vertices, uv);
                    break;

                case FillMethod.Radial90:
                    Alloc(4);
                    FillUtils.FillRadial90((Origin90)origin, amount, clockwise, vertRect, uvRect, vertices, uv);
                    break;

                case FillMethod.Radial180:
                    Alloc(8);
                    FillUtils.FillRadial180((Origin180)origin, amount, clockwise, vertRect, uvRect, vertices, uv);
                    break;

                case FillMethod.Radial360:
                    Alloc(12);
                    FillUtils.FillRadial360((Origin360)origin, amount, clockwise, vertRect, uvRect, vertices, uv);
                    break;
            }
        }

Usage Example

 static public int Fill(IntPtr l)
 {
     try {
         FairyGUI.NGraphics  self = (FairyGUI.NGraphics)checkSelf(l);
         FairyGUI.FillMethod a1;
         checkEnum(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         System.Boolean a4;
         checkType(l, 5, out a4);
         UnityEngine.Rect a5;
         checkValueType(l, 6, out a5);
         UnityEngine.Rect a6;
         checkValueType(l, 7, out a6);
         self.Fill(a1, a2, a3, a4, a5, a6);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }