Exemple #1
0
 public RectangleD Multiply(SizeD size)
 {
     return(new RectangleD(UpperLeft, Size.Multiply(size)));
 }
Exemple #2
0
 public RectangleD Divide(SizeD size)
 {
     return(new RectangleD(UpperLeft, Size.Divide(size)));
 }
Exemple #3
0
 public RectangleD Subtract(SizeD size)
 {
     return(new RectangleD(UpperLeft, Size.Subtract(size)));
 }
Exemple #4
0
 public RectangleD Add(SizeD size)
 {
     return(new RectangleD(UpperLeft, Size.Add(size)));
 }
Exemple #5
0
 /// <summary>
 /// Creates a new instance using the specified location, width, and height.
 /// </summary>
 /// <param name="_location"></param>
 /// <param name="_size"></param>
 public RectangleD(PointD _location, SizeD _size)
     : this(_location.X, _location.Y, _location.X + _size.Width, _location.Y + _size.Height)
 {
 }
Exemple #6
0
 public RectangleD Inflate(SizeD size)
 {
     return(Inflate(size.Width, size.Height));
 }
Exemple #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));
 }