Skip to content

GArc extends GObject

The GArc 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.

Factory Functions

function GArc(width, height, start, sweep)
function GArc(x, y, width, height, start, sweep)
Creates a GArc object consisting of an elliptical arc that fits inside the bounding box specified by x, y, width, and height. If x and y are missing, they default to 0. 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, a start angle of 135 begins along the line running northwest, and a start angle of -90 begins along the line running south. 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.

Method

function GArc::setStartAngle(angle)
Sets the starting angle for this GArc object.
function GArc::getStartAngle()
Returns: The starting angle for this GArc.
function GArc::setSweepAngle(angle)
Sets the sweep angle for this GArc.
function GArc::getSweepAngle()
Returns: The current sweep angle for this GArc.
function GArc::getStartPoint()
Returns: The x and y coordinates of where the arc starts as a GPoint.
function GArc::getEndPoint()
Returns: The x and y coordinates of where the arc ends as a GPoint.
function GArc::setFrameRectangle(object)
Sets this GArc's bounding box to match the given object's. object must be a GRectangle or a GObject.
function GArc::setFrameRectangle(x, y, width, height)
Sets this GArc's bounding box to match the coordinates and dimensions given.
function GArc::getFrameRectangle()
Returns: The current bounding box of this GArc, as a GRectangle.