Package org.eclipse.gef.geometry.planar

## Interface IRotatable<T extends IGeometry>

Type Parameters:
  `T` - type of the rotation results

All Known Implementing Classes:
  `Arc`, `BezierCurve`, `CubicCurve`, `CurvedPolygon`, `Ellipse`, `Line`, `Pie`, `PolyBezier`, `Polygon`, `Polyline`, `QuadraticCurve`, `Rectangle`, `Region`, `Ring`, `RoundedRectangle`

    public interface IRotatable<T extends IGeometry>

The `IRotatable` interface collects the out-of-place rotation short-cut methods.

Rotation cannot be applied directly to all `IGeometry`s. For example, `Rectangle`, `Ellipse`, `Region` and `RoundedRectangle` cannot be slanted. Therefore, you have to specify the result type for the rotation methods via a type parameter.

There are two directions of rotation: clock-wise (CW) and counter-clock-wise (CCW). The individual method names reflect the direction of rotation that is used. These are the rotation methods: `getRotatedCCW(Angle)`, `getRotatedCCW(Angle, Point)`, `getRotatedCCW(Angle, double, double)`, `getRotatedCW(Angle)`, `getRotatedCW(Angle, Point)`, `getRotatedCW(Angle, double, double)`.

If you do not specify a `Point` to rotate around, the implementation can appropriately choose one. In most cases, this will be the center `Point` of the rotated object.

### Method Summary

All Methods Instance Methods Abstract Methods
`T` `getRotatedCCW​(Angle angle)` Rotates the calling object by specified `Angle` counter-clock-wise (CCW) around its center `Point`.
`T` `getRotatedCCW​(Angle angle, double cx, double cy)` Rotates the calling object by the specified `Angle` counter-clock-wise (CCW) around the specified center `Point` (cx, cy).
`T` `getRotatedCCW​(Angle angle, Point center)` Rotates the calling object by the specified `Angle` counter-clock-wise (CCW) around the specified center `Point`.
`T` `getRotatedCW​(Angle angle)` Rotates the calling object by specified `Angle` clock-wise (CW) around its center `Point`.
`T` `getRotatedCW​(Angle angle, double cx, double cy)` Rotates the calling object by the specified `Angle` clock-wise (CW) around the specified center `Point` (cx, cy).
`T` `getRotatedCW​(Angle angle, Point center)` Rotates the calling object by the specified `Angle` clock-wise (CW) around the specified center `Point`.

### Method Detail

#### getRotatedCCW

    T getRotatedCCW​(Angle angle)

Rotates the calling object by specified `Angle` counter-clock-wise (CCW) around its center `Point`. Does not necessarily return an object of the same type.

Parameters:
  `angle` - rotation `Angle`
Returns:
  an `IGeometry` representing the result of the rotation

#### getRotatedCCW

    T getRotatedCCW​(Angle angle,
                    double cx,
                    double cy)

Rotates the calling object by the specified `Angle` counter-clock-wise (CCW) around the specified center `Point` (cx, cy). Does not necessarily return an object of the same type.

Parameters:
  `angle` - rotation `Angle`
  `cx` - x-coordinate of the relative `Point` for the rotation
  `cy` - y-coordinate of the relative `Point` for the rotation
Returns:
  an `IGeometry` representing the result of the rotation

#### getRotatedCCW

    T getRotatedCCW​(Angle angle,
                    Point center)

Rotates the calling object by the specified `Angle` counter-clock-wise (CCW) around the specified center `Point`. Does not necessarily return an object of the same type.

Parameters:
  `angle` - rotation `Angle`
  `center` - relative `Point` for the rotation
Returns:
  an `IGeometry` representing the result of the rotation

#### getRotatedCW

    T getRotatedCW​(Angle angle)

Rotates the calling object by specified `Angle` clock-wise (CW) around its center `Point`. Does not necessarily return an object of the same type.

Parameters:
  `angle` - rotation `Angle`
Returns:
  an `IGeometry` representing the result of the rotation

#### getRotatedCW

    T getRotatedCW​(Angle angle,
                   double cx,
                   double cy)

Rotates the calling object by the specified `Angle` clock-wise (CW) around the specified center `Point` (cx, cy). Does not necessarily return an object of the same type.

Parameters:
  `angle` - rotation `Angle`
  `cx` - x-coordinate of the relative `Point` for the rotation
  `cy` - y-coordinate of the relative `Point` for the rotation
Returns:
  an `IGeometry` representing the result of the rotation

#### getRotatedCW

    T getRotatedCW​(Angle angle,
                   Point center)

Rotates the calling object by the specified `Angle` clock-wise (CW) around the specified center `Point`. Does not necessarily return an object of the same type.

Parameters:
  `angle` - rotation `Angle`
  `center` - relative `Point` for the rotation
Returns:
  an `IGeometry` representing the result of the rotation