コード例 #1
0
 public RectInt(PointInt location, SizeInt size)
 {
     this.x      = location.X;
     this.y      = location.Y;
     this.width  = size.Width;
     this.height = size.Height;
 }
コード例 #2
0
ファイル: SizeInt.cs プロジェクト: hanzhou/ZenithMap
        public override bool Equals(object obj)
        {
            if (!(obj is SizeInt))
            {
                return(false);
            }
            SizeInt comp = (SizeInt)obj;

            return((comp.width == this.width) && (comp.height == this.height));
        }
コード例 #3
0
ファイル: SizeInt.cs プロジェクト: hanzhou/ZenithMap
 public static SizeInt Sub(SizeInt s1, SizeInt s2)
 {
     return(new SizeInt(s1.Width - s2.Width, s1.Height - s2.Height));
 }
コード例 #4
0
ファイル: SizeInt.cs プロジェクト: hanzhou/ZenithMap
 public static SizeInt Add(SizeInt s1, SizeInt s2)
 {
     return(new SizeInt(s1.Width + s2.Width, s1.Height + s2.Height));
 }
コード例 #5
0
ファイル: SizeInt.cs プロジェクト: hanzhou/ZenithMap
 public static SizeInt operator -(SizeInt s1, SizeInt s2)
 {
     return(SizeInt.Sub(s1, s2));
 }
コード例 #6
0
ファイル: SizeInt.cs プロジェクト: hanzhou/ZenithMap
 public static SizeInt operator +(SizeInt s1, SizeInt s2)
 {
     return(SizeInt.Add(s1, s2));
 }