Ejemplo n.º 1
0
 /// <summary> Initializing constructor. </summary>
 /// <param name="position"> The top left position. <see cref="TPoint"/> </param>
 /// <param name="size"> The size. <see cref="TSize"/> </param>
 public TRectangle(TPoint position, TSize size)
 {
     X      = position.X;
     Y      = position.Y;
     Width  = size.Width;
     Height = size.Height;
 }
Ejemplo n.º 2
0
 /// <summary> Initializing constructor. </summary>
 /// <param name="x"> The x-coordinate. <see cref="System.Int32"/> </param>
 /// <param name="y"> The y-coordinate. <see cref="System.Int32"/> </param>
 /// <param name="size"> The size. <see cref="TSize"/> </param>
 public TRectangle(int x, int y, TSize size)
 {
     X      = x;
     Y      = y;
     Width  = size.Width;
     Height = size.Height;
 }
Ejemplo n.º 3
0
 /// <summary> Substract the indicated size. </summary>
 /// <param name="subtrahend"> The size to substract. <see cref="TSize"/> </param>
 public void Substract(TSize subtrahend)
 {
     Width  = Width - subtrahend.Width;
     Height = Height - subtrahend.Height;
 }
Ejemplo n.º 4
0
 /// <summary> Add the indicated size. </summary>
 /// <param name="summand"> The size to add. <see cref="TSize"/> </param>
 public void Add(TSize summand)
 {
     Width  = Width + summand.Width;
     Height = Height + summand.Height;
 }
Ejemplo n.º 5
0
 /// <summary> Substract the indicated size. </summary>
 /// <param name="subtrahend"> The size to substract. <see cref="TSize"/> </param>
 public void Substract(TSize subtrahend)
 {
     X = X - subtrahend.Width;
     Y = Y - subtrahend.Height;
 }
Ejemplo n.º 6
0
 /// <summary> Add the indicated size. </summary>
 /// <param name="summand"> The size to add. <see cref="TSize"/> </param>
 public void Add(TSize summand)
 {
     X = X + summand.Width;
     Y = Y + summand.Height;
 }