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