コード例 #1
0
 /// <summary>
 /// Constructs a <see cref="Rect2i"/> from x, y, width, and height.
 /// </summary>
 /// <param name="x">The position's X coordinate.</param>
 /// <param name="y">The position's Y coordinate.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 public Rect2i(int x, int y, int width, int height)
 {
     _position = new Vector2i(x, y);
     _size     = new Vector2i(width, height);
 }
コード例 #2
0
 /// <summary>
 /// Constructs a <see cref="Rect2i"/> from a position, width, and height.
 /// </summary>
 /// <param name="position">The position.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 public Rect2i(Vector2i position, int width, int height)
 {
     _position = position;
     _size     = new Vector2i(width, height);
 }
コード例 #3
0
 /// <summary>
 /// Constructs a <see cref="Rect2i"/> from x, y, and size.
 /// </summary>
 /// <param name="x">The position's X coordinate.</param>
 /// <param name="y">The position's Y coordinate.</param>
 /// <param name="size">The size.</param>
 public Rect2i(int x, int y, Vector2i size)
 {
     _position = new Vector2i(x, y);
     _size     = size;
 }
コード例 #4
0
 /// <summary>
 /// Constructs a <see cref="Rect2i"/> from a position and size.
 /// </summary>
 /// <param name="position">The position.</param>
 /// <param name="size">The size.</param>
 public Rect2i(Vector2i position, Vector2i size)
 {
     _position = position;
     _size     = size;
 }