org.eclipse.gef.geometry.convert.swt

## Class AWT2SWT

- java.lang.Object
- - org.eclipse.gef.geometry.convert.swt.AWT2SWT

    public class AWT2SWT
    extends java.lang.Object

Utility class to support conversions between Java2D's geometry API and SWT's geometry API.

### Method Summary

All Methods Static Methods Concrete Methods
`static org.eclipse.swt.graphics.PathData` `toSWTPathData(java.awt.geom.PathIterator iterator)` Converts a Java2D `PathIterator` into an SWT `PathData`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### toSWTPathData

    public static org.eclipse.swt.graphics.PathData toSWTPathData(java.awt.geom.PathIterator iterator)

Converts a Java2D `PathIterator` into an SWT `PathData`. Note that while Java2D's `PathIterator` contains the specification of a `PathIterator.WIND_EVEN_ODD` or `PathIterator.WIND_NON_ZERO` winding rule (`PathIterator.getWindingRule()`), this information is not kept in SWT's `PathData`, but is instead specified when drawing an SWT `Path` (which can be constructed from the `PathData`) on an SWT `GC` (via `SWT.FILL_WINDING` or `SWT.FILL_EVEN_ODD`). Therefore the returned SWT `PathData` will not contain any information about the winding rule that was specified in the passed in `PathIterator`.

Parameters:
  `iterator` - the `PathIterator` to transform
Returns:
  a new `PathData` representing the same geometric path