/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }