예제 #1
0
파일: GRect.cs 프로젝트: ralex1975/zq
 public GRect(GPoint location, GSize size)
 {
     this.x      = location.X;
     this.y      = location.Y;
     this.width  = size.Width;
     this.height = size.Height;
 }
예제 #2
0
파일: GSize.cs 프로젝트: ralex1975/zq
        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));
        }
예제 #3
0
파일: GSize.cs 프로젝트: ralex1975/zq
 public static GSize Subtract(GSize sz1, GSize sz2)
 {
     return(new GSize(sz1.Width - sz2.Width, sz1.Height - sz2.Height));
 }
예제 #4
0
파일: GSize.cs 프로젝트: ralex1975/zq
 public static GSize Add(GSize sz1, GSize sz2)
 {
     return(new GSize(sz1.Width + sz2.Width, sz1.Height + sz2.Height));
 }
예제 #5
0
파일: GPoint.cs 프로젝트: ralex1975/zq
 public static GPoint Subtract(GPoint pt, GSize sz)
 {
     return(new GPoint(pt.X - sz.Width, pt.Y - sz.Height));
 }
예제 #6
0
파일: GPoint.cs 프로젝트: ralex1975/zq
 public static GPoint Add(GPoint pt, GSize sz)
 {
     return(new GPoint(pt.X + sz.Width, pt.Y + sz.Height));
 }
예제 #7
0
파일: GPoint.cs 프로젝트: ralex1975/zq
 public GPoint(GSize sz)
 {
     this.x = sz.Width;
     this.y = sz.Height;
 }
예제 #8
0
파일: GRect.cs 프로젝트: ralex1975/zq
 public void Inflate(GSize size)
 {
     Inflate(size.Width, size.Height);
 }