public RectangleD Multiply(SizeD size) { return(new RectangleD(UpperLeft, Size.Multiply(size))); }
public RectangleD Divide(SizeD size) { return(new RectangleD(UpperLeft, Size.Divide(size))); }
public RectangleD Subtract(SizeD size) { return(new RectangleD(UpperLeft, Size.Subtract(size))); }
public RectangleD Add(SizeD size) { return(new RectangleD(UpperLeft, Size.Add(size))); }
/// <summary> /// Creates a new instance using the specified location, width, and height. /// </summary> /// <param name="location"></param> public RectangleD(PointD location, SizeD size) : this(location.X, location.Y, location.X + size.Width, location.Y + size.Height) { }
public RectangleD Inflate(SizeD size) { return(Inflate(size.Width, size.Height)); }
/// <summary> /// Changes the size and shape of the RectangleD to match the aspect ratio of the specified RectangleD. /// </summary> /// <param name="size"></param> /// <returns></returns> /// <remarks>This method will expand a RectangleD outward, from its center point, until /// the ratio of its width to its height matches the specified value.</remarks> public RectangleD ToAspectRatio(SizeD size) { // Calculate the aspect ratio return(ToAspectRatio(size.Width / size.Height)); }