/// <summary> /// Constructs a new Rectangle instance. /// </summary> /// <param name="a">The left-top corner of the Rectangle.</param> /// <param name="b">The right-top corner of the Rectangle.</param> /// <param name="c">The left-bottom of the Rectangle.</param> /// <param name="d">The right-bottom of the Rectangle.</param> public Rectangle(Point2i a, Point2i b, Point2i c, Point2i d) : this() { Location = a; Size = new Sizei(d.X - c.X, d.Y - b.Y); }
/// <summary> /// Constructs a new Rectangle instance. /// </summary> /// <param name="location">The top-left corner of the Rectangle.</param> /// <param name="size">The width and height of the Rectangle.</param> public Rectangle(Point2i location, Sizei size) : this() { Location = location; Size = size; }
/// <summary> /// Sets the viewport width of this <see cref="Camera"/>. /// </summary> /// <param name="width">The new width.</param> public void SetViewportWidth(int width) { Sizei v = new Sizei(width, _viewportSize.Height); ViewportSize = v; }
/// <summary> /// Sets the viewport height of this <see cref="Camera"/>. /// </summary> /// <param name="height">The new height.</param> public void SetViewportHeight(int height) { Sizei v = new Sizei(_viewportSize.Width, height); ViewportSize = v; }
/// <summary> /// Sets the viewport size of this <see cref="Camera"/>. /// </summary> /// <param name="size">The new viewport <see cref="Sizef"/>.</param> public void SetViewportSize(Sizei size) { ViewportSize = size; }