|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.sketch.grammar.me.Ground
A basic Ground object with shading and edges.
| Field Summary | |
Graphics |
graphics
Graphics context for this Geometric object. |
| Constructor Summary | |
Ground(Shade shade,
Polygon edge)
The constructor. |
|
| Method Summary | |
double |
getAngle()
Returns the angle of the Ground WRT the x axis in radians. |
Vector |
getChildren()
This method should return a vector containing the children of this object. |
Polygon[] |
getPolygonalBoundsArray()
This method should return the polygonal array bounds of this non-terminal object. |
Rectangle |
getRectangularBounds()
This method should return the Rectangular bounds of this non-terminal object. |
String |
getType()
Implement Paintable |
void |
paint()
Draw the Ground |
void |
paint(Graphics g)
Draw the Ground |
void |
paintOriginal(Graphics g)
This method is used to paint the original data points that forms this GeometricObject |
boolean |
pointIsOn(Point p,
int radius)
Returns true if the point is within +-radius distance from the curve defining the object. |
boolean |
pointIsOnOriginal(Point p,
int radius)
Returns true if the point is within +-radius distance from the original curve defining the object. |
void |
setGraphicsContext(Graphics g)
Set graphics context for this Ground object. |
void |
translate(double x,
double y)
Add the arguments to the (x, y) position of the object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public transient Graphics graphics
| Constructor Detail |
public Ground(Shade shade,
Polygon edge)
| Method Detail |
public double getAngle()
getAngle in interface Rotatablepublic void paint()
paint in interface Paintablepublic void paint(Graphics g)
paint in interface Paintablepublic void paintOriginal(Graphics g)
paintOriginal in interface Paintablepublic void setGraphicsContext(Graphics g)
setGraphicsContext in interface Paintablepublic String getType()
getType in interface Paintablepublic Rectangle getRectangularBounds()
getRectangularBounds in interface NonTerminalpublic Polygon[] getPolygonalBoundsArray()
getPolygonalBoundsArray in interface NonTerminalpublic Vector getChildren()
getChildren in interface NonTerminal
public void translate(double x,
double y)
translate in interface Translatable
public boolean pointIsOn(Point p,
int radius)
pointIsOn in interface Translatable
public boolean pointIsOnOriginal(Point p,
int radius)
pointIsOnOriginal in interface Translatable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||