FairyGUI.DisplayObject.SetSize C# (CSharp) Method

SetSize() public method

public SetSize ( float wv, float hv ) : void
wv float
hv float
return void
        public void SetSize(float wv, float hv)
        {
            bool wc = !Mathf.Approximately(wv, _contentRect.width);
            bool hc = !Mathf.Approximately(hv, _contentRect.height);

            if (wc || hc)
            {
                _contentRect.width = wv;
                _contentRect.height = hv;
                OnSizeChanged(wc, hc);
            }
        }

Usage Example

 static public int SetSize(IntPtr l)
 {
     try {
         FairyGUI.DisplayObject self = (FairyGUI.DisplayObject)checkSelf(l);
         System.Single          a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         self.SetSize(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }