Пример #1
0
 public RectInt(PointInt location, SizeInt size)
 {
     this.x      = location.X;
     this.y      = location.Y;
     this.width  = size.Width;
     this.height = size.Height;
 }
Пример #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));
        }
Пример #3
0
 public static SizeInt Sub(SizeInt s1, SizeInt s2)
 {
     return(new SizeInt(s1.Width - s2.Width, s1.Height - s2.Height));
 }
Пример #4
0
 public static SizeInt Add(SizeInt s1, SizeInt s2)
 {
     return(new SizeInt(s1.Width + s2.Width, s1.Height + s2.Height));
 }
Пример #5
0
 public static SizeInt operator -(SizeInt s1, SizeInt s2)
 {
     return(SizeInt.Sub(s1, s2));
 }
Пример #6
0
 public static SizeInt operator +(SizeInt s1, SizeInt s2)
 {
     return(SizeInt.Add(s1, s2));
 }