Beispiel #1
0
 public GRect(GPoint location, GSize size)
 {
     this.x      = location.X;
     this.y      = location.Y;
     this.width  = size.Width;
     this.height = size.Height;
 }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 public static GSize Subtract(GSize sz1, GSize sz2)
 {
     return(new GSize(sz1.Width - sz2.Width, sz1.Height - sz2.Height));
 }
Beispiel #4
0
 public static GSize Add(GSize sz1, GSize sz2)
 {
     return(new GSize(sz1.Width + sz2.Width, sz1.Height + sz2.Height));
 }
Beispiel #5
0
 public static GPoint Subtract(GPoint pt, GSize sz)
 {
     return(new GPoint(pt.X - sz.Width, pt.Y - sz.Height));
 }
Beispiel #6
0
 public static GPoint Add(GPoint pt, GSize sz)
 {
     return(new GPoint(pt.X + sz.Width, pt.Y + sz.Height));
 }
Beispiel #7
0
 public GPoint(GSize sz)
 {
     this.x = sz.Width;
     this.y = sz.Height;
 }
Beispiel #8
0
 public void Inflate(GSize size)
 {
     Inflate(size.Width, size.Height);
 }