Esempio n. 1
0
 public RectInt(PointInt location, SizeInt size)
 {
     this.x      = location.X;
     this.y      = location.Y;
     this.width  = size.Width;
     this.height = size.Height;
 }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            if (!(obj is SizeInt))
            {
                return(false);
            }
            SizeInt comp = (SizeInt)obj;

            return((comp.width == this.width) && (comp.height == this.height));
        }
Esempio n. 3
0
 public static SizeInt Sub(SizeInt s1, SizeInt s2)
 {
     return(new SizeInt(s1.Width - s2.Width, s1.Height - s2.Height));
 }
Esempio n. 4
0
 public static SizeInt Add(SizeInt s1, SizeInt s2)
 {
     return(new SizeInt(s1.Width + s2.Width, s1.Height + s2.Height));
 }
Esempio n. 5
0
 public static SizeInt operator -(SizeInt s1, SizeInt s2)
 {
     return(SizeInt.Sub(s1, s2));
 }
Esempio n. 6
0
 public static SizeInt operator +(SizeInt s1, SizeInt s2)
 {
     return(SizeInt.Add(s1, s2));
 }