|
GObjectGFillableObject
GArc
The GArc
class is a graphical object whose appearance
consists of an arc. If unfilled, the arc is simply a portion of
the circumference of an ellipse; if filled, the arc is a pie-shaped
wedge connected to the center of the figure.
Constructor Summary | |
---|---|
GArc(width, height, start, sweep)
GArc object consisting of an elliptical arc
located at the point (0, 0). |
|
GArc(x, y, width, height, start, sweep)
GArc object consisting of an elliptical
arc inscribed in the rectangle with the specified bounds. |
Method Summary | |
---|---|
getEndPoint()
|
|
getFrameRectangle()
GRectangle in which this arc is
inscribed. |
|
getStartAngle()
GArc object. |
|
getStartPoint()
|
|
getSweepAngle()
GArc object. |
|
setStartAngle(theta)
GArc object. |
|
setSweepAngle(sweep)
GArc object. |
Inherited Method Summary | |
contains(x, y) | |
getBounds() | |
getColor() | |
getFillColor() | |
getHeight() | |
getLocation() GPoint .
| |
getSize() | |
getWidth() | |
getX() | |
getY() | |
isVisible() | |
isFilled() | |
move(dx, dy) dx and dy .
| |
movePolar(r, theta) | |
scale(sf) sf , which applies in both dimensions.
| |
sendBackward() | |
sendForward() | |
sendToBack() | |
sendToFront() | |
setColor(color) | |
setFillColor(color) | |
setFilled(flag) | |
setLocation(x, y) x , y ).
| |
setVisible(flag) |
Constructor Detail |
---|
GArc(width, height, start, sweep)
GArc
object consisting of an elliptical arc
located at the point (0, 0). For complete descriptions of the
other parameters, see the entry for the
GArc
constructor that includes explicit
x
and y
parameters.
Usage: | garc = GArc(width, height, start, sweep) | ||||||||
Parameters: |
|
GArc(x, y, width, height, start, sweep)
GArc
object consisting of an elliptical
arc inscribed in the rectangle with the specified bounds.
The start
parameter indicates the angle at which the arc
begins and is measured in degrees counterclockwise from the +x
axis. Thus, a start
angle of 0 indicates an arc
that begins along the line running eastward from the center (the 3:00
o’clock position), a start
angle of 135
begins along the line running northwest, and a start
angle of -90 begins along the line running south (the 6:00
o’clock position). The sweep
parameter indicates
the extent of the arc and is also measured in degrees counterclockwise.
A sweep
angle of 90 defines a quarter circle extending
counterclockwise from the start
angle, and a
sweep
angle of -180 defines a semicircle extending
clockwise.
Usage: | garc = GArc(x, y, width, height, start, sweep) | ||||||||||||
Parameters: |
|
Method Detail |
---|
getEndPoint()
Usage: | pt = garc.getEndPoint() |
Returns: | The point at which the arc ends |
getFrameRectangle()
GRectangle
in which this arc is
inscribed. Note that this is usually different from the bounding box
returned by getBounds
, which
returns the bounding box in which the displayed portion of the arc
is contained.
Usage: | bounds = garc.getFrameRectangle() |
Returns: | The GRectangle in which this arc is inscribed
|
getStartAngle()
GArc
object.
Usage: | start = garc.getStartAngle() |
Returns: | The starting angle for this arc |
getStartPoint()
Usage: | pt = garc.getStartPoint() |
Returns: | The point at which the arc starts |
getSweepAngle()
GArc
object.
Usage: | sweep = garc.getSweepAngle() |
Returns: | The sweep angle for this arc |
setFrameRectangle(x, y, width, height)
Usage: | garc.setFrameRectangle(x, y, width, height) | ||||||||
Parameters: |
|
setStartAngle(theta)
GArc
object.
Usage: | garc.setStartAngle(start) | ||
Parameter: |
|
setSweepAngle(sweep)
GArc
object.
Usage: | garc.setSweepAngle(sweep) | ||
Parameter: |
|
|