Exemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of <see cref="SizeShort"/> from a specified <see cref="PointShort"/>.
 /// </summary>
 /// <param name="pt">The <see cref="PointShort"/> that should be used to create the <see cref="SizeShort"/>.</param>
 public SizeShort(PointShort pt)
 {
     Width  = (pt.X);
     Height = (pt.Y);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Offsets a <see cref="PointShort"/> by the specified <see cref="SizeShort"/>.
 /// </summary>
 /// <param name="pt">The <see cref="PointShort"/> that should be offset.</param>
 /// <param name="sz">The <see cref="SizeShort"/> to offset by.</param>
 /// <returns>A new <see cref="PointShort"/> that has been offset.</returns>
 public static PointShort Add(PointShort pt, SizeShort sz) => pt + sz;
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new instance of <see cref="SizeShort"/> from a specified <see cref="PointShort"/>.
 /// </summary>
 /// <param name="pt">The <see cref="PointShort"/> that should be used to create the <see cref="SizeShort"/>.</param>
 public SizeShort(PointShort pt)
 {
     Width = (pt.X);
     Height = (pt.Y);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Subtracts a <see cref="PointShort"/> by a <see cref="SizeShort"/>.
 /// </summary>
 /// <param name="pt">The <see cref="PointShort"/> to be subtracted from.</param>
 /// <param name="sz">The <see cref="SizeShort"/> to subtract.</param>
 /// <returns>A <see cref="PointShort"/> representing the difference.</returns>
 public static PointShort Subtract(PointShort pt, SizeShort sz) => pt - sz;
Exemplo n.º 5
0
 /// <summary>
 /// Offsets the current <see cref="PointShort"/> by the specified <see cref="PointShort"/>.
 /// </summary>
 /// <param name="p">The <see cref="PointShort"/> to offest this <see cref="PointShort"/> by.</param>
 /// <returns>The new <see cref="PointShort"/>.</returns>
 public PointShort Offset(PointShort p) => new PointShort((short)(_x + p.X), (short)(_y + p.Y));
Exemplo n.º 6
0
 /// <summary>
 /// Offsets a <see cref="PointShort"/> by the specified <see cref="SizeShort"/>.
 /// </summary>
 /// <param name="pt">The <see cref="PointShort"/> that should be offset.</param>
 /// <param name="sz">The <see cref="SizeShort"/> to offset by.</param>
 /// <returns>A new <see cref="PointShort"/> that has been offset.</returns>
 public static PointShort Add(PointShort pt, SizeShort sz) => pt + sz;
Exemplo n.º 7
0
 /// <summary>
 /// Subtracts a <see cref="PointShort"/> by a <see cref="SizeShort"/>.
 /// </summary>
 /// <param name="pt">The <see cref="PointShort"/> to be subtracted from.</param>
 /// <param name="sz">The <see cref="SizeShort"/> to subtract.</param>
 /// <returns>A <see cref="PointShort"/> representing the difference.</returns>
 public static PointShort Subtract(PointShort pt, SizeShort sz) => pt - sz;
Exemplo n.º 8
0
 /// <summary>
 /// Offsets the current <see cref="PointShort"/> by the specified <see cref="PointShort"/>.
 /// </summary>
 /// <param name="p">The <see cref="PointShort"/> to offest this <see cref="PointShort"/> by.</param>
 /// <returns>The new <see cref="PointShort"/>.</returns>
 public PointShort Offset(PointShort p) => new PointShort((short)(_x + p.X), (short)(_y + p.Y));