public class DrawingX extends DrawingObject
Constructor and Description |
---|
DrawingX(int x1,
int y1,
int x2,
int y2)
This constructs a new DrawingX object.
|
Modifier and Type | Method and Description |
---|---|
void |
drawObject(java.awt.Graphics2D g2)
This function draws the X 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 DrawingX object.
|
boolean |
wasClicked(int px,
int py)
This function determines whether the given point (px, py), where the
user has clicked, hits any part of this X.
|
clickHitEllipse, clickHitLine
public DrawingX(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