Table of Contents

Method Rotate

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Rotate<T>(IEnumerable<T>, GeoPoint2, double)

Turns objects about a base point, as ROTATE does: counter-clockwise, the angle taken from nought up to a whole turn first as ROTATE takes it (a turn of 2 pi is none, -pi / 2 is three quarters, which a hatch's pattern lines show). A line from (0, 0) to (100, 0) turned about (0, 0) by pi / 2 runs from (0, 0) to (0, 100). One undo step named ROTATE.

public IReadOnlyList<T> Rotate<T>(IEnumerable<T> entities, GeoPoint2 basePoint, double angle) where T : DxfEntity

Parameters

entities IEnumerable<T>

The drawing's objects to turn.

basePoint GeoPoint2

The point they turn about, in the world.

angle double

The angle, in radians.

Returns

IReadOnlyList<T>

The objects given, turned where they stand, in the order given.

Type Parameters

T

The type of the objects given.

Exceptions

ArgumentNullException

Thrown when the list is null.

ArgumentException

Thrown when an object of the list is null, or the base point is not finite.

ArgumentOutOfRangeException

Thrown when the angle is not a finite number.

InvalidOperationException

Thrown when an object is refused, as the remarks say.