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, clickHitLinepublic DrawingX(int x1,
int y1,
int x2,
int y2)
public void resizeObject(int x1,
int y1,
int x2,
int y2)
resizeObject in class DrawingObjectpublic boolean wasClicked(int px,
int py)
wasClicked in class DrawingObjectpublic java.awt.Rectangle getBoundingBox()
getBoundingBox in class DrawingObjectpublic void drawObject(java.awt.Graphics2D g2)
drawObject in class DrawingObject