Constructor GeoRectangle2
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GeoRectangle2(GeoPoint2, double, double, double)
Initializes a new GeoRectangle2 instance from center, width, height, and rotation angle.
public GeoRectangle2(GeoPoint2 center, double width, double height, double angleRad = 0)
Parameters
centerGeoPoint2Center point of the rectangle.
widthdoubleRectangle width.
heightdoubleRectangle height.
angleRaddoubleRotation angle in radians.
Exceptions
- ArgumentOutOfRangeException
Thrown when width or height is negative, NaN or infinite, or the angle is not a finite number.
GeoRectangle2(GeoCoordinateSystem2, double, double)
Initializes a rectangle from its own coordinate system and its size along each of its axes.
public GeoRectangle2(GeoCoordinateSystem2 coordinateSystem, double width, double height)
Parameters
coordinateSystemGeoCoordinateSystem2Where the rectangle sits and which way it is turned.
widthdoubleThe size along the system's X axis.
heightdoubleThe size along the system's Y axis.
Exceptions
- ArgumentOutOfRangeException
Thrown when a size is negative or not a number.
GeoRectangle2(double, double, double, double)
Initializes a new GeoRectangle2 instance from the bottom-left corner position (unrotated) and dimensions.
public GeoRectangle2(double x, double y, double width, double height)