Core2D.Math.Rect2.Create C# (CSharp) Method

Create() public static method

Creates a new Rect2 instance.
public static Create ( Point2 tl, Point2 br, double dx = 0.0, double dy = 0.0 ) : Rect2
tl Point2
br Point2
dx double
dy double
return Rect2
        public static Rect2 Create(Point2 tl, Point2 br, double dx = 0.0, double dy = 0.0)
        {
            return Rect2.Create(tl.X, tl.Y, br.X, br.Y, dx, dy);
        }

Same methods

Rect2::Create ( XPoint tl, XPoint br, double dx = 0.0, double dy = 0.0 ) : Rect2
Rect2::Create ( double x1, double y1, double x2, double y2, double dx = 0.0, double dy = 0.0 ) : Rect2

Usage Example

Example #1
0
 /// <summary>
 /// Creates a new <see cref="Rect2"/> instance.
 /// </summary>
 /// <param name="tl"></param>
 /// <param name="br"></param>
 /// <param name="dx"></param>
 /// <param name="dy"></param>
 /// <returns></returns>
 public static Rect2 Create(XPoint tl, XPoint br, double dx = 0.0, double dy = 0.0)
 {
     return(Rect2.Create(tl.X, tl.Y, br.X, br.Y, dx, dy));
 }