public class GOval extends GObject implements GFillable, GResizable, GScalable
GOval class is a graphical object whose appearance consists
of an oval.| Constructor and Description |
|---|
GOval()
Constructs a new 0x0 oval, positioned at the origin.
|
GOval(float width,
float height)
Constructs a new oval with the specified width and height,
positioned at the origin.
|
GOval(float x,
float y,
float width,
float height)
Constructs a new oval with the specified bounds.
|
GOval(GCanvas canvas)
Constructs a new 0x0 oval, positioned at the origin.
|
GOval(GCanvas canvas,
float width,
float height)
Constructs a new oval with the specified width and height,
positioned at the origin.
|
GOval(GCanvas canvas,
float x,
float y,
float width,
float height)
Constructs a new oval with the specified bounds.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(float x,
float y)
Checks to see whether a point is inside the object.
|
void |
paint(Canvas canvas)
Implements the
paint operation for this graphical object. |
addTo, addTo, addTo, contains, getBottomY, getBounds, getCenterX, getCenterY, getColor, getFillColor, getGCanvas, getHeight, getLeftX, getLocation, getPaint, getRightX, getSize, getTopY, getWidth, getX, getY, intersects, isFilled, isVisible, moveBy, moveByPolar, moveTo, moveTo, moveTo, moveToPolar, remove, repaint, scale, scale, sendBackward, sendForward, sendToBack, sendToFront, setBottomY, setBounds, setBounds, setBounds, setCanvas, setColor, setFillColor, setFilled, setGCanvas, setLocation, setLocation, setLocation, setPaint, setRightX, setSize, setSize, setVisible, setX, setY, toString, translateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFillColor, isFilled, setFillColor, setFilledsetBounds, setBounds, setSize, setSizepublic GOval()
public GOval(float width,
float height)
width - The width of the oval in pixelsheight - The height of the oval in pixelspublic GOval(float x,
float y,
float width,
float height)
x - The x-coordinate of the upper left cornery - The y-coordinate of the upper left cornerwidth - The width of the oval in pixelsheight - The height of the oval in pixelspublic GOval(GCanvas canvas)
public GOval(GCanvas canvas, float width, float height)
width - The width of the oval in pixelsheight - The height of the oval in pixelspublic GOval(GCanvas canvas, float x, float y, float width, float height)
x - The x-coordinate of the upper left cornery - The y-coordinate of the upper left cornerwidth - The width of the oval in pixelsheight - The height of the oval in pixels