Class AWT2SWT
java.lang.Object
org.eclipse.gef.geometry.convert.swt.AWT2SWT
Utility class to support conversions between Java2D's geometry API and SWT's
geometry API.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PathData
toSWTPathData
(PathIterator iterator) Converts a Java2DPathIterator
into an SWTPathData
.
-
Method Details
-
toSWTPathData
Converts a Java2DPathIterator
into an SWTPathData
. Note that while Java2D'sPathIterator
contains the specification of aPathIterator.WIND_EVEN_ODD
orPathIterator.WIND_NON_ZERO
winding 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_WINDING
orSWT.FILL_EVEN_ODD
). Therefore the returned SWTPathData
will not contain any information about the winding rule that was specified in the passed inPathIterator
.- Parameters:
iterator
- thePathIterator
to transform- Returns:
- a new
PathData
representing the same geometric path
-