# Uses of Class
org.eclipse.gef.geometry.planar.Polygon

Packages that use Polygon
Package
Description
org.eclipse.gef.geometry.convert.swt
This package provides support for converting geometric objects to SWT and for conversion between SWT and AWT.
org.eclipse.gef.geometry.planar
This package provides support for geometric calculations based on shapes.

## Uses of Polygon in org.eclipse.gef.geometry.convert.swt

Methods in org.eclipse.gef.geometry.convert.swt that return Polygon
Modifier and Type
Method
Description
`static Polygon`
SWT2Geometry.`toPolygon(int... swtPointArray)`
Converts the given integer array to a GEF `Polygon`.
Methods in org.eclipse.gef.geometry.convert.swt with parameters of type Polygon
Modifier and Type
Method
Description
`static final int[]`
Geometry2SWT.`toSWTPointArray(Polygon p)`
Returns an integer array, which represents the sequence of coordinates of the `Point`s that make up this `Polygon`.

## Uses of Polygon in org.eclipse.gef.geometry.planar

Methods in org.eclipse.gef.geometry.planar that return Polygon
Modifier and Type
Method
Description
`Polygon`
Polygon.`getCopy()`
Returns a copy of this `Polygon`, which is made up by the same points.
`Polygon`
Rectangle.`getRotatedCCW(Angle alpha)`
Rotates this `Rectangle` counter-clock-wise by the given `Angle` around the center `Point` of this `Rectangle` (see `AbstractRectangleBasedGeometry.getCenter()`).
`Polygon`
Rectangle.`getRotatedCCW(Angle alpha, double cx, double cy)`
Rotates this `Rectangle` counter-clock-wise by the given `Angle` around the given `Point`.
`Polygon`
Rectangle.`getRotatedCCW(Angle alpha, Point center)`
Rotates this `Rectangle` counter-clock-wise by the given `Angle` around the given `Point`.
`Polygon`
Rectangle.`getRotatedCW(Angle alpha)`
Rotates this `Rectangle` clock-wise by the given `Angle` around the center (`AbstractRectangleBasedGeometry.getCenter()`) of this `Rectangle`.
`Polygon`
Rectangle.`getRotatedCW(Angle alpha, double cx, double cy)`
Rotates this `Rectangle` clock-wise by the given `Angle` alpha around the given `Point` (cx, cy).
`Polygon`
Rectangle.`getRotatedCW(Angle alpha, Point center)`
Rotates this `Rectangle` clock-wise by the given `Angle` alpha around the given `Point`.
`Polygon[]`
Ring.`getShapes()`
`Polygon`
Polygon.`getTransformed(AffineTransform t)`
`Polygon`
Rectangle.`getTransformed(AffineTransform t)`
Returns a `Polygon`, which represents the transformed `Rectangle`.
`Polygon[]`
Polygon.`getTriangulation()`
Naive, recursive ear-clipping algorithm to triangulate this simple, planar `Polygon`.
`Polygon`
Rectangle.`toPolygon()`
Converts this `Rectangle` into a `Polygon` representation.
Methods in org.eclipse.gef.geometry.planar with parameters of type Polygon
Modifier and Type
Method
Description
`Ring`
Ring.`add(Polygon p)`
Adds the given `Polygon` to this `Ring`.
`boolean`
Polygon.`contains(Polygon p)`
Checks whether the given `Polygon` is fully contained within this `Polygon`.
Constructors in org.eclipse.gef.geometry.planar with parameters of type Polygon
Modifier
Constructor
Description
``
`Ring(Polygon... polygons)`
Constructs a new `Ring` from the given `Polygon`s.