Example #1
0
 public RectangleD Multiply(SizeD size)
 {
     return(new RectangleD(UpperLeft, Size.Multiply(size)));
 }
Example #2
0
 public RectangleD Divide(SizeD size)
 {
     return(new RectangleD(UpperLeft, Size.Divide(size)));
 }
Example #3
0
 public RectangleD Subtract(SizeD size)
 {
     return(new RectangleD(UpperLeft, Size.Subtract(size)));
 }
Example #4
0
 public RectangleD Add(SizeD size)
 {
     return(new RectangleD(UpperLeft, Size.Add(size)));
 }
Example #5
0
 /// <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)
 {
 }
Example #6
0
 public RectangleD Inflate(SizeD size)
 {
     return(Inflate(size.Width, size.Height));
 }
Example #7
0
 /// <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));
 }