|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.softsmithy.lib.awt.Star
public class Star
A star shape.
Constructor Summary | |
---|---|
Star(int x,
int y,
int width,
int height)
Creates a new Star Shape. |
Method Summary | |
---|---|
boolean |
contains(double x,
double y)
Determines if the specified coordinates are inside this Star. |
boolean |
contains(double x,
double y,
double w,
double h)
Tests if the interior of this Star entirely contains the specified set of rectangular coordinates. |
boolean |
contains(Point2D p)
Tests if a specified Point2D is inside the boundary of this Star. |
boolean |
contains(Rectangle2D r)
Tests if the interior of this Star entirely contains the specified Rectangle2D. |
Rectangle |
getBounds()
Gets the bounding box of this Star. |
Rectangle2D |
getBounds2D()
Returns the high precision bounding box of the Shape. |
PathIterator |
getPathIterator(AffineTransform at)
Returns an iterator object that iterates along the boundary of this Star and provides access to the geometry of the outline of this Star. |
PathIterator |
getPathIterator(AffineTransform at,
double flatness)
Returns an iterator object that iterates along the boundary of the Shape and provides access to the geometry of the outline of the Shape. |
boolean |
intersects(double x,
double y,
double w,
double h)
Tests if the interior of this Star intersects the interior of a specified set of rectangular coordinates. |
boolean |
intersects(Rectangle2D r)
Tests if the interior of this Star intersects the interior of a specified Rectangle2D. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Star(int x, int y, int width, int height)
x
- x-coordinate of the top-left cornery
- y-coordinate of the top-left cornerwidth
- width of the starheight
- height of the starMethod Detail |
---|
public Rectangle getBounds()
getBounds
in interface Shape
getBounds2D()
public Rectangle2D getBounds2D()
getBounds2D
in interface Shape
getBounds()
public boolean contains(double x, double y)
contains
in interface Shape
x
- x-coordinatey
- y-coordinate
public boolean contains(Point2D p)
contains
in interface Shape
p
- a specified Point2D
contains(double x, double y)
public boolean intersects(double x, double y, double w, double h)
intersects
in interface Shape
x
- x-coordinate of the top-left corner of the specified rectangular areay
- y-coordinate of the top-left corner of the specified rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular area
Area
public boolean intersects(Rectangle2D r)
intersects
in interface Shape
r
- a specified Rectangle2D
intersects(double, double, double, double)
public boolean contains(double x, double y, double w, double h)
contains
in interface Shape
x
- x-coordinate of the top-left corner of the specified rectangular areay
- y-coordinate of the top-left corner of the specified rectangular areaw
- the width of the set of rectangular coordinatesh
- the height of the set of rectangular coordinates
Area
,
intersects(double, double, double, double)
public boolean contains(Rectangle2D r)
contains
in interface Shape
r
- the specified Rectangle2D
contains(double, double, double, double)
public PathIterator getPathIterator(AffineTransform at)
getPathIterator
in interface Shape
at
- an optional AffineTransform to be applied to the coordinates as
they are returned in the iteration, or null if untransformed
coordinates are desired
public PathIterator getPathIterator(AffineTransform at, double flatness)
getPathIterator
in interface Shape
at
- an optional AffineTransform to be applied to the
coordinates as they are returned in the iteration, or null if
untransformed coordinates are desiredflatness
- the maximum amount that the control points for a given
curve can vary from colinear before a subdivided curve is replaced by
a straight line connecting the endpoints. Since Stars are already
flat the flatness parameter is ignored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |