public RectInt(PointInt location, SizeInt size) { this.x = location.X; this.y = location.Y; this.width = size.Width; this.height = size.Height; }
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)); }
public static SizeInt Sub(SizeInt s1, SizeInt s2) { return(new SizeInt(s1.Width - s2.Width, s1.Height - s2.Height)); }
public static SizeInt Add(SizeInt s1, SizeInt s2) { return(new SizeInt(s1.Width + s2.Width, s1.Height + s2.Height)); }
public static SizeInt operator -(SizeInt s1, SizeInt s2) { return(SizeInt.Sub(s1, s2)); }
public static SizeInt operator +(SizeInt s1, SizeInt s2) { return(SizeInt.Add(s1, s2)); }