Class Geometry2SWT
-
Method Summary
Modifier and TypeMethodDescriptionstatic final PathDataConverts the given path into an SWTPathDatarepresentation.static final PointtoSWTPoint(Point p) Creates a new SWTPointfrom 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 Rectanglestatic final Regionstatic RegiontoSWTRegion(Ring r)
-
Method Details
-
toSWTPathData
Converts the given path into an SWTPathDatarepresentation. -
toSWTPoint
Creates a new SWTPointfrom this Point.- Parameters:
p- thePointto 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- theLineto 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
Points 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
Pointis smaller than the x coordinate of the centroid, then the x coordinate of thatPointis rounded down. Otherwise it is rounded up. Accordingly, if the y coordinate of aPointis 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
Points 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
Pointis smaller than the x coordinate of the centroid, then the x coordinate of thatPointis rounded down. Otherwise it is rounded up. Accordingly, if the y coordinate of aPointis smaller than the y coordinate of the centroid, it is rounded down. Otherwise, it is rounded up. -
toSWTRectangle
-
toSWTRegion
-
toSWTRegion
-