public class SWTShapeManager extends Object
Constructor and Description |
---|
SWTShapeManager() |
Modifier and Type | Method and Description |
---|---|
static void |
awtToSWT(Rectangle2D aRect,
org.eclipse.swt.graphics.Rectangle sRect)
Populates the SWT rectangle with the provided Swing Rectangle2D's
coordinates.
|
static double[] |
shapeToPolyline(Shape shape)
Converts the provided shape into an array of point coordinates given as
one dimensional array with this format: x1,y1,x2,y3,....
|
static int[] |
transform(double[] points,
AffineTransform at)
Transforms the given points by the transform provided, leaving the
original points untouched.
|
static void |
transform(Rectangle2D rect,
AffineTransform at)
Apply the specified transform to the specified rectangle, modifying the
rect.
|
public static void transform(Rectangle2D rect, AffineTransform at)
rect
- The rectangle to be transformedat
- The transform to use to transform the rectanglepublic static void awtToSWT(Rectangle2D aRect, org.eclipse.swt.graphics.Rectangle sRect)
aRect
- awt rectangle to extract coordinates fromsRect
- swt rectangle to populatepublic static double[] shapeToPolyline(Shape shape)
shape
- shape to convertpublic static int[] transform(double[] points, AffineTransform at)
points
- points to transformat
- transform to applyCopyright © 1995–2013 Piccolo2D. All rights reserved.