コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref='RelativeRectangle'/> class with the specified location and size.
 /// </summary>
 public RelativeRectangle(RelativePoint location, RelativeSize size)
 {
     x      = location.X;
     y      = location.Y;
     width  = size.Width;
     height = size.Height;
 }
コード例 #2
0
 /// <summary>
 /// Translates a <see cref='RelativePoint'/> by the negative of a given <see cref='RelativeSize'/> .
 /// </summary>
 public static RelativePoint Subtract(RelativePoint pt, RelativeSize sz) => new RelativePoint(pt.X - sz.Width, pt.Y - sz.Height);
コード例 #3
0
 /// <summary>
 /// Translates a <see cref='RelativePoint'/> by a given <see cref='RelativeSize'/> .
 /// </summary>
 public static RelativePoint Add(RelativePoint pt, RelativeSize sz) => new RelativePoint(pt.X + sz.Width, pt.Y + sz.Height);
コード例 #4
0
 /// <summary>
 /// Inflates this <see cref='RelativeRectangle'/> by the specified amount.
 /// </summary>
 public void Inflate(RelativeSize size) => Inflate(size.Width, size.Height);