public class SWT2Geometry
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
toLine(int... swtPointArray)
Converts the given integer array to a GEF
Line . |
static Path |
toPath(int windingRule,
org.eclipse.swt.graphics.PathData pd)
Converts the given SWT
PathData to a GEF Path associated
with the given windingRule. |
static Point |
toPoint(org.eclipse.swt.graphics.Point swtPoint)
Converts the given
SWT Point to a
GEF Point . |
static Polygon |
toPolygon(int... swtPointArray)
Converts the given integer array to a GEF
Polygon . |
static java.lang.Object |
toPolyline(int... swtPointArray)
Converts the given integer array to a GEF
Polyline . |
static Rectangle |
toRectangle(org.eclipse.swt.graphics.Rectangle swtRectangle)
Converts the given
SWT
Rectangle to a GEF Rectangle . |
public static java.lang.Object toLine(int... swtPointArray)
Line
. The integer
array has to consist of exactly 4 values which are interpreted as the x
and y coordinates of the Line
's start Point
and the x and
y coordinates of the Line
's end point , respectively.swtPointArray
- an integer array which contains the x0, y0, x1, y1 coordinatesLine
at the specified positionpublic static Path toPath(int windingRule, org.eclipse.swt.graphics.PathData pd)
PathData
to a GEF Path
associated
with the given windingRule.windingRule
- one of
pd
- the PathData
to convertPath
representing the given PathData
public static Point toPoint(org.eclipse.swt.graphics.Point swtPoint)
SWT Point
to a
GEF Point
.swtPoint
- the SWT Point
to
convertPoint
at the position of the given
SWT Point
public static Polygon toPolygon(int... swtPointArray)
public static java.lang.Object toPolyline(int... swtPointArray)
Copyright (c) 2014 itemis AG, and others. All rights reserved.