コード例 #1
0
 /// <summary>
 ///     Constructor from location and size
 /// </summary>
 /// <param name="location">NativePoint</param>
 /// <param name="size">NativeSize</param>
 public NativeRect(NativePoint location, NativeSize size)
 {
     _left   = location.X;
     _top    = location.Y;
     _right  = _left + size.Width;
     _bottom = _top + size.Height;
 }
コード例 #2
0
 public bool Contains(NativePoint point)
 {
     return(point.X >= Left && point.X <= Right && point.Y >= Top && point.Y <= Bottom);
 }
コード例 #3
0
 /// <summary>
 ///     Constructor from topLeft and bottomRight
 /// </summary>
 /// <param name="topLeft">NativePoint</param>
 /// <param name="bottomRight">NativePoint</param>
 public NativeRect(NativePoint topLeft, NativePoint bottomRight) : this(topLeft.X, topLeft.Y, bottomRight.X - topLeft.X, bottomRight.Y - topLeft.Y)
 {
 }
コード例 #4
0
 public void Deconstruct(out NativePoint location, out NativeSize size)
 {
     location = Location;
     size     = Size;
 }