Table of Contents

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

center GeoPoint2

Center point of the rectangle.

width double

Rectangle width.

height double

Rectangle height.

angleRad double

Rotation 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

coordinateSystem GeoCoordinateSystem2

Where the rectangle sits and which way it is turned.

width double

The size along the system's X axis.

height double

The 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)

Parameters

x double

X coordinate of the bottom-left corner when unrotated.

y double

Y coordinate of the bottom-left corner when unrotated.

width double

Rectangle width.

height double

Rectangle height.