예제 #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);