Exemplo n.º 1
0
 private void GetPositionValue(out Pointi pos)
 {
     NoesisGUI_PINVOKE.Mouse_GetPositionValue(swigCPtr, out pos);
     if (NoesisGUI_PINVOKE.SWIGPendingException.Pending)
     {
         throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 2
0
        public static Pointi Parse(string str)
        {
            Pointi p;

            if (Pointi.TryParse(str, out p))
            {
                return(p);
            }
            throw new ArgumentException("Cannot create Pointi from '" + str + "'");
        }
Exemplo n.º 3
0
        public static bool TryParse(string str, out Pointi result)
        {
            bool ret = NoesisGUI_PINVOKE.Pointi_TryParse(str != null ? str : string.Empty, out result);

            if (NoesisGUI_PINVOKE.SWIGPendingException.Pending)
            {
                throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
     private void GetPositionValue(out Pointi pos)
     {
         NoesisGUI_PINVOKE.Mouse_GetPositionValue(swigCPtr, out pos);
 #if UNITY_EDITOR || NOESIS_API
         if (NoesisGUI_PINVOKE.SWIGPendingException.Pending)
         {
             throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
         }
 #endif
     }
        public void Expand(Pointi point)
        {
            float right  = Right;
            float bottom = Bottom;

            X      = System.Math.Min(X, point.X);
            Y      = System.Math.Min(Y, point.Y);
            Width  = (uint)(System.Math.Max(right, point.X) - X);
            Height = (uint)(System.Math.Max(bottom, point.Y) - Y);
        }
        public static bool TryParse(string str, out Pointi result)
        {
            bool ret = NoesisGUI_PINVOKE.Pointi_TryParse(str != null ? str : string.Empty, out result);

    #if UNITY_EDITOR || NOESIS_API
            if (NoesisGUI_PINVOKE.SWIGPendingException.Pending)
            {
                throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
            }
    #endif
            return(ret);
        }
 public void Offset(Pointi offset)
 {
     Offset(offset.X, offset.Y);
 }
Exemplo n.º 8
0
 public static float Dot(Pointi v0, Pointi v1)
 {
     return(v0.X * v1.X + v0.Y * v1.Y);
 }
 public Recti(Pointi p, Sizei size) : this(p.X, p.Y, size.Width, size.Height)
 {
 }
 public bool Contains(Pointi point)
 {
     return(Contains(point.X, point.Y));
 }
 public Point(Pointi point) : this((float)point.X, (float)point.Y)
 {
 }
Exemplo n.º 12
0
 public Sizei(Pointi point) : this((uint)point.X, (uint)point.Y)
 {
 }
Exemplo n.º 13
0
 public bool Equals(Pointi v)
 {
     return(this == v);
 }
Exemplo n.º 14
0
 public static float PerpDot(Pointi v0, Pointi v1)
 {
     return(v0.X * v1.Y - v0.Y * v1.X);
 }
Exemplo n.º 15
0
 public static float LengthSquared(Pointi v)
 {
     return(v.X * v.X + v.Y * v.Y);
 }
Exemplo n.º 16
0
 public static Pointi Perpendicular(Pointi v, bool cw)
 {
     return(cw ? PerpendicularCW(v) : PerpendicularCCW(v));
 }
Exemplo n.º 17
0
 public static Pointi PerpendicularCW(Pointi v)
 {
     return(new Pointi(v.Y, -v.X));
 }