public interface GeometricObject2d
Modifier and Type | Method and Description |
---|---|
Point2d |
calculateCentroid()
Calculate the centroid of the shape
|
Rectangle |
calculateRegularBoundingBox()
Compute the regular (oriented to the axes) bounding box of the shape.
|
double |
getHeight() |
double |
getWidth() |
double |
maxX() |
double |
maxY() |
double |
minX() |
double |
minY() |
void |
scale(float sc)
Scale the shape by the given amount about (0,0).
|
void |
scale(Point2d centre,
float sc)
Scale the shape by the given amount about the given point.
|
void |
scaleCentroid(float sc)
Scale the shape about its centroid.
|
GeometricObject2d |
transform(Jama.Matrix transform)
Apply a 3x3 transform matrix to a copy of the
GeometricObject2d and
return it |
void |
translate(float x,
float y)
Translate the shapes position
|
Rectangle calculateRegularBoundingBox()
void translate(float x, float y)
x
- x-translationy
- y-translationvoid scale(float sc)
sc
- the scale factor.void scale(Point2d centre, float sc)
centre
- the centre of the scaling operationsc
- the scale factorvoid scaleCentroid(float sc)
sc
- the scale factorPoint2d calculateCentroid()
double minX()
double minY()
double maxX()
double maxY()
double getWidth()
double getHeight()
GeometricObject2d transform(Jama.Matrix transform)
GeometricObject2d
and
return ittransform
- 3x3 transform matrix