Method Transform
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
Transform(GeoPoint2)
Transforms a point.
public GeoPoint2 Transform(GeoPoint2 point)
Parameters
pointGeoPoint2
Returns
Transform(GeoVector2)
Transforms a vector, which the translation does not touch.
public GeoVector2 Transform(GeoVector2 vector)
Parameters
vectorGeoVector2
Returns
Transform(GeoLine2)
Transforms a segment.
public GeoLine2 Transform(GeoLine2 line)
Parameters
lineGeoLine2
Returns
Transform(GeoPolyline2)
Transforms a chain.
public GeoPolyline2 Transform(GeoPolyline2 polyline)
Parameters
polylineGeoPolyline2
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
Transform(GeoPolygon2)
Transforms a polygon.
public GeoPolygon2 Transform(GeoPolygon2 polygon)
Parameters
polygonGeoPolygon2
Returns
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
faceGeoFace2
Returns
Exceptions
- ArgumentNullException
Thrown when the face is null.
Transform(GeoCircle2)
Transforms a circle.
public GeoCircle2 Transform(GeoCircle2 circle)
Parameters
circleGeoCircle2
Returns
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
rectangleGeoRectangle2
Returns
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
triangleGeoTriangle2The 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
pointsIEnumerable<GeoPoint2>
Returns
Exceptions
- ArgumentNullException
Thrown when the sequence is null.