/// <summary> /// Initializes a new instance of the <see cref="RelativeRect"/> structure. /// </summary> /// <param name="topLeft">The top left position of the rectangle.</param> /// <param name="bottomRight">The bottom right position of the rectangle.</param> /// <param name="unit">The unit of the rect.</param> public RelativeRect(Point topLeft, Point bottomRight, RelativeUnit unit) { Rect = new Rect(topLeft, bottomRight); Unit = unit; }
/// <summary> /// Initializes a new instance of the <see cref="RelativeRect"/> structure. /// </summary> /// <param name="size">The size of the rectangle.</param> /// <param name="unit">The unit of the rect.</param> public RelativeRect(Size size, RelativeUnit unit) { Rect = new Rect(size); Unit = unit; }
/// <summary> /// Initializes a new instance of the <see cref="RelativeRect"/> structure. /// </summary> /// <param name="position">The position of the rectangle.</param> /// <param name="size">The size of the rectangle.</param> /// <param name="unit">The unit of the rect.</param> public RelativeRect(Point position, Size size, RelativeUnit unit) { Rect = new Rect(position, size); Unit = unit; }
/// <summary> /// Initializes a new instance of the <see cref="RelativeRect"/> structure. /// </summary> /// <param name="x">The X position.</param> /// <param name="y">The Y position.</param> /// <param name="width">The width.</param> /// <param name="height">The height.</param> /// <param name="unit">The unit of the rect.</param> public RelativeRect(double x, double y, double width, double height, RelativeUnit unit) { Rect = new Rect(x, y, width, height); Unit = unit; }
/// <summary> /// Initializes a new instance of the <see cref="RelativeRect"/> structure. /// </summary> /// <param name="rect">The rectangle.</param> /// <param name="unit">The unit of the rect.</param> public RelativeRect(Rect rect, RelativeUnit unit) { Rect = rect; Unit = unit; }
/// <summary> /// Initializes a new instance of the <see cref="RelativePoint"/> struct. /// </summary> /// <param name="point">The point.</param> /// <param name="unit">The unit.</param> public RelativePoint(Point point, RelativeUnit unit) { _point = point; _unit = unit; }
/// <summary> /// Initializes a new instance of the <see cref="RelativePoint"/> struct. /// </summary> /// <param name="x">The X point.</param> /// <param name="y">The Y point</param> /// <param name="unit">The unit.</param> public RelativePoint(double x, double y, RelativeUnit unit) : this(new Point(x, y), unit) { }