Ejemplo n.º 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;
 }
Ejemplo n.º 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);
Ejemplo n.º 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);
Ejemplo n.º 4
0
 /// <summary>
 /// Inflates this <see cref='RelativeRectangle'/> by the specified amount.
 /// </summary>
 public void Inflate(RelativeSize size) => Inflate(size.Width, size.Height);