Table of Contents

Method Transform

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

Transform(GeoPoint2)

Transforms a point.

public GeoPoint2 Transform(GeoPoint2 point)

Parameters

point GeoPoint2

Returns

GeoPoint2

Transform(GeoVector2)

Transforms a vector, which the translation does not touch.

public GeoVector2 Transform(GeoVector2 vector)

Parameters

vector GeoVector2

Returns

GeoVector2

Transform(GeoLine2)

Transforms a segment.

public GeoLine2 Transform(GeoLine2 line)

Parameters

line GeoLine2

Returns

GeoLine2

Transform(GeoPolyline2)

Transforms a chain.

public GeoPolyline2 Transform(GeoPolyline2 polyline)

Parameters

polyline GeoPolyline2

Returns

GeoPolyline2

Exceptions

ArgumentNullException

Thrown when the chain is null.

Transform(GeoPolygon2)

Transforms a polygon.

public GeoPolygon2 Transform(GeoPolygon2 polygon)

Parameters

polygon GeoPolygon2

Returns

GeoPolygon2

Remarks

A transformation that turns shapes round, a mirror or a negative scaling, reverses the winding: a polygon that ran counter-clockwise comes back clockwise.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

Transform(GeoFace2)

Transforms a face and its holes.

public GeoFace2 Transform(GeoFace2 face)

Parameters

face GeoFace2

Returns

GeoFace2

Exceptions

ArgumentNullException

Thrown when the face is null.

Transform(GeoCircle2)

Transforms a circle.

public GeoCircle2 Transform(GeoCircle2 circle)

Parameters

circle GeoCircle2

Returns

GeoCircle2

Remarks

A circle survives a transformation only when every direction is stretched by the same amount. Under a scaling that differs between the axes it becomes an ellipse, which this library has no type for, so the attempt is refused rather than answered with a circle of some averaged radius.

Exceptions

InvalidOperationException

Thrown when the transformation would turn the circle into an ellipse.

Transform(GeoRectangle2)

Transforms a rectangle.

public GeoRectangle2 Transform(GeoRectangle2 rectangle)

Parameters

rectangle GeoRectangle2

Returns

GeoRectangle2

Remarks

A rectangle stays a rectangle under a move, a turn, a mirror and a uniform scaling. A scaling that differs between the axes, or a shear, leaves a parallelogram instead, which this library has no type for: transform rectangle.ToPolygon() when that is what you want.

Exceptions

InvalidOperationException

Thrown when the transformation would turn the rectangle into a parallelogram.

Transform(GeoTriangle2)

Transforms a triangle, corner by corner.

public GeoTriangle2 Transform(GeoTriangle2 triangle)

Parameters

triangle GeoTriangle2

The triangle to transform.

Returns

GeoTriangle2

The triangle the transformation makes of it. Any affine map takes a triangle to a triangle, so nothing is refused; a mirror or a negative scaling reverses the winding.

Transform(IEnumerable<GeoPoint2>)

Transforms a sequence of points.

public IEnumerable<GeoPoint2> Transform(IEnumerable<GeoPoint2> points)

Parameters

points IEnumerable<GeoPoint2>

Returns

IEnumerable<GeoPoint2>

Exceptions

ArgumentNullException

Thrown when the sequence is null.