コード例 #1
0
ファイル: Rect.cs プロジェクト: KroneckerX/WCell
 public Rect(Size size)
 {
     if (size.IsEmpty)
     {
         this = s_empty;
     }
     else
     {
         x = y = 0.0f;
         width = size.Width;
         height = size.Height;
     }
 }
コード例 #2
0
ファイル: Rect.cs プロジェクト: NVN/WCell
 public Rect(Point location, Size size)
 {
     if (size.IsEmpty)
     {
         this = s_empty;
     }
     else
     {
         x = location.X;
         y = location.Y;
         width = size.Width;
         height = size.Height;
     }
 }
コード例 #3
0
ファイル: Rect.cs プロジェクト: NVN/WCell
 public static Rect Inflate(Rect rect, Size size)
 {
     rect.Inflate(size.Width, size.Height);
     return rect;
 }
コード例 #4
0
ファイル: Rect.cs プロジェクト: NVN/WCell
 public void Inflate(Size size)
 {
     Inflate(size.Width, size.Height);
 }
コード例 #5
0
ファイル: Size.cs プロジェクト: remixod/netServer
 public bool Equals(Size other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.width.Equals(width) && other.height.Equals(height);
 }
コード例 #6
0
ファイル: Size.cs プロジェクト: remixod/netServer
 public static Size Subtract(Size sz1, Size sz2)
 {
     return new Size((sz1.Width - sz2.Width), (sz1.Height - sz2.Height));
 }
コード例 #7
0
ファイル: Size.cs プロジェクト: remixod/netServer
 public static Size Add(Size sz1, Size sz2)
 {
     return new Size((sz1.Width + sz2.Width), (sz1.Height + sz2.Height));
 }
コード例 #8
0
ファイル: Size.cs プロジェクト: remixod/netServer
 static Size()
 {
     Empty = new Size(0.0f, 0.0f);
 }
コード例 #9
0
ファイル: Point.cs プロジェクト: remixod/netServer
 public static Point Subtract(Point pt, Size sz)
 {
     return new Point((pt.X - sz.Width), (pt.Y - sz.Height));
 }
コード例 #10
0
ファイル: Point.cs プロジェクト: remixod/netServer
 public static Point Add(Point pt, Size sz)
 {
     return new Point(pt.X + sz.Width, pt.Y + sz.Height);
 }