public static Point2D Scale0(Point2D point, Size2D factors)
 {
     return(new Point2D(point.X * factors.Width, point.Y * factors.Height));
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Rectangle2D"/> class with an initial location and size.
 /// </summary>
 /// <param name="location"></param>
 /// <param name="size"></param>
 public Rectangle2D(Point2D location, Size2D size)
     : this(location.X, location.Y, size.Width, size.Height)
 {
 }
 public static Point2D Scale(Point2D point, Size2D factors)
 => Scale0(point, factors);
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Rectangle2D"/> class with an empty location, with the provided size.
 /// </summary>
 /// <param name="size">The height and width of the <see cref="Rectangle2D"/>.</param>
 public Rectangle2D(Size2D size)
     : this(0, 0, size.Width, size.Height)
 {
 }