Class Geometry2SWT
-
Method Summary
Modifier and TypeMethodDescriptionstatic final PathData
Converts the given path into an SWTPathData
representation.static final Point
toSWTPoint
(Point p) Creates a new SWTPoint
from this Point.static final int[]
Returns an integer array of dimension 4, whose values represent the integer-based coordinates of thisLine
's start and end point.static final int[]
static final int[]
static final Rectangle
static final Region
static Region
toSWTRegion
(Ring r)
-
Method Details
-
toSWTPathData
Converts the given path into an SWTPathData
representation. -
toSWTPoint
Creates a new SWTPoint
from this Point.- Parameters:
p
- thePoint
to convert- Returns:
- A new SWT Point
-
toSWTPointArray
Returns an integer array of dimension 4, whose values represent the integer-based coordinates of thisLine
's start and end point.- Parameters:
l
- theLine
to convert- Returns:
- an array containing integer values, which are obtained by casting x1, y1, x2, y2
-
toSWTPointArray
Returns an integer array, which represents the sequence of coordinates of the
Point
s that make up thisPolygon
. The x and y coordinate values are transfered to integer values by either applyingMath.floor(double)
orMath.ceil(double)
to them, dependent on their relative position to the centroid of thisPolygon
(seeAbstractPointListBasedGeometry.getCentroid()
).If the x coordinate of a
Point
is smaller than the x coordinate of the centroid, then the x coordinate of thatPoint
is rounded down. Otherwise it is rounded up. Accordingly, if the y coordinate of aPoint
is smaller than the y coordinate of the centroid, it is rounded down. Otherwise, it is rounded up. -
toSWTPointArray
Returns an integer array, which represents the sequence of coordinates of the
Point
s that make up thisPolyline
. The x and y coordinate values are transfered to integer values by either applyingMath.floor(double)
orMath.ceil(double)
to them, dependent on their relative position to the centroid of thisPolyline
(seeAbstractPointListBasedGeometry.getCentroid()
).If the x coordinate of a
Point
is smaller than the x coordinate of the centroid, then the x coordinate of thatPoint
is rounded down. Otherwise it is rounded up. Accordingly, if the y coordinate of aPoint
is smaller than the y coordinate of the centroid, it is rounded down. Otherwise, it is rounded up. -
toSWTRectangle
-
toSWTRegion
-
toSWTRegion
-