public SizeD(SizeD size) { if (size == null) { throw new ArgumentNullException("size"); } Width = size.Width; Height = size.Height; }
public RectD(PointD pt, SizeD sz) { if (pt == null) { throw new ArgumentNullException("pt"); } if (sz == null) { throw new ArgumentNullException("sz"); } X = pt.X; Y = pt.Y; Width = sz.Width; Height = sz.Height; }
public static PointD Subtract(PointD pt, SizeD sz) { return(new PointD(pt.X - sz.Width, pt.Y - sz.Height)); }
public static PointD Add(PointD pt, SizeD sz) { return(new PointD(pt.X + sz.Width, pt.Y + sz.Height)); }
public static SizeD Subtract(SizeD sz1, SizeD sz2) { return(new SizeD(sz1.Width - sz2.Width, sz1.Height - sz2.Height)); }
public static SizeD Add(SizeD sz1, SizeD sz2) { return(new SizeD(sz1.Width + sz2.Width, sz1.Height + sz2.Height)); }