Beispiel #1
0
        public SizeD(SizeD size)
        {
            if (size == null)
            {
                throw new ArgumentNullException("size");
            }

            Width  = size.Width;
            Height = size.Height;
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
 public static PointD Subtract(PointD pt, SizeD sz)
 {
     return(new PointD(pt.X - sz.Width, pt.Y - sz.Height));
 }
Beispiel #4
0
 public static PointD Add(PointD pt, SizeD sz)
 {
     return(new PointD(pt.X + sz.Width, pt.Y + sz.Height));
 }
Beispiel #5
0
 public static SizeD Subtract(SizeD sz1, SizeD sz2)
 {
     return(new SizeD(sz1.Width - sz2.Width, sz1.Height - sz2.Height));
 }
Beispiel #6
0
 public static SizeD Add(SizeD sz1, SizeD sz2)
 {
     return(new SizeD(sz1.Width + sz2.Width, sz1.Height + sz2.Height));
 }