Class AWT2SWT
- java.lang.Object
-
- org.eclipse.gef.geometry.convert.swt.AWT2SWT
-
public class AWT2SWT extends java.lang.ObjectUtility class to support conversions between Java2D's geometry API and SWT's geometry API.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PathDatatoSWTPathData(java.awt.geom.PathIterator iterator)Converts a Java2DPathIteratorinto an SWTPathData.
-
-
-
Method Detail
-
toSWTPathData
public static PathData toSWTPathData(java.awt.geom.PathIterator iterator)
Converts a Java2DPathIteratorinto an SWTPathData. Note that while Java2D'sPathIteratorcontains the specification of aPathIterator.WIND_EVEN_ODDorPathIterator.WIND_NON_ZEROwinding rule (PathIterator.getWindingRule()), this information is not kept in SWT'sPathData, but is instead specified when drawing an SWTPath(which can be constructed from thePathData) on an SWTGC(viaSWT.FILL_WINDINGorSWT.FILL_EVEN_ODD). Therefore the returned SWTPathDatawill not contain any information about the winding rule that was specified in the passed inPathIterator.- Parameters:
iterator- thePathIteratorto transform- Returns:
- a new
PathDatarepresenting the same geometric path
-
-