public class DrawingEllipse extends DrawingObject
Constructor and Description |
---|
DrawingEllipse(int x1,
int y1,
int x2,
int y2)
This constructs a new DrawingEllipse object.
|
Modifier and Type | Method and Description |
---|---|
void |
drawObject(java.awt.Graphics2D g2)
This function draws the ellipse using the given Graphics2D context.
|
java.awt.Rectangle |
getBoundingBox()
This function returns a Bounding Box.
|
void |
resizeObject(int x1,
int y1,
int x2,
int y2)
This resizes a DrawingEllipse object.
|
boolean |
wasClicked(int px,
int py)
This function determines whether the given point (px, py), where the
user has clicked, hits the edge of this ellipse.
|
clickHitEllipse, clickHitLine
public DrawingEllipse(int x1, int y1, int x2, int y2)
public void resizeObject(int x1, int y1, int x2, int y2)
resizeObject
in class DrawingObject
public boolean wasClicked(int px, int py)
wasClicked
in class DrawingObject
public java.awt.Rectangle getBoundingBox()
getBoundingBox
in class DrawingObject
public void drawObject(java.awt.Graphics2D g2)
drawObject
in class DrawingObject