public GRect(GPoint location, GSize 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 GSize)) { return(false); } GSize comp = (GSize)obj; // Note value types can't have derived classes, so we don't need to // return((comp.width == this.width) && (comp.height == this.height)); }
public static GSize Subtract(GSize sz1, GSize sz2) { return(new GSize(sz1.Width - sz2.Width, sz1.Height - sz2.Height)); }
public static GSize Add(GSize sz1, GSize sz2) { return(new GSize(sz1.Width + sz2.Width, sz1.Height + sz2.Height)); }
public static GPoint Subtract(GPoint pt, GSize sz) { return(new GPoint(pt.X - sz.Width, pt.Y - sz.Height)); }
public static GPoint Add(GPoint pt, GSize sz) { return(new GPoint(pt.X + sz.Width, pt.Y + sz.Height)); }
public GPoint(GSize sz) { this.x = sz.Width; this.y = sz.Height; }
public void Inflate(GSize size) { Inflate(size.Width, size.Height); }