A C G I M R S

A

add(gobj) - Method in class GCompound
Adds a new graphical object to this GCompound.
add(gobj) - Method in class GWindow
Adds the graphical object to this canvas.
add(gobj, x, y) - Method in class GCompound
Adds the graphical object to this canvas and sets its location to the point (xy).
add(gobj, x, y) - Method in class GWindow
Adds the graphical object to this canvas and sets its location to the point (xy).
add_edge(dx, dy) - Method in class GPolygon
Adds an edge to the polygon whose components are given by the displacements dx and dy from the last vertex.
add_event_listener(type, fn) - Method in class GWindow
Registers a new listener for events of the specified type occuring in the window.
add_polar_edge(r, theta) - Method in class GPolygon
Adds an edge to the polygon specified in polar coordinates.
add_vertex(x, y) - Method in class GPolygon
Adds a vertex at (x, y) relative to the polygon origin.

C

contains(x, y) - Method in class GCompound
Checks to see whether a point is “inside” the compound, which means that it is inside one of the components.
contains(x, y) - Method in class GObject
Checks to see whether a point is contained in this object.
create_rgb_pixel(red, green, blue) - Static method in class GImage
Creates a new opaque pixel value from the three color components.
create_rgb_pixel(alpha, red, green, blue) - Static method in class GImage
Creates a new opaque pixel value from the transparency and the three color components.

G

GArc - Class in the Portable Graphics Library
This class displays an elliptical arc.
GArc(width, height, start, sweep) GArc(width, height, start, sweep) Creates a new GArc object consisting of an elliptical arc located at the point (0, 0).
GArc(x, y, width, height, start, sweep) - Method in class GArc
Creates a new GArc object consisting of an elliptical arc inscribed in the rectangle with the specified bounds.
GCompound - Class in the Portable Graphics Library
This class defines a graphical object that consists of a collection of other graphical objects.
GCompound() - Method in class GCompound
Creates a new GCompound object with no internal components.
GDimension - Class in the Portable Graphics Library
This class encapsulates a size containing a width and a height.
GDimension(width, height) - Method in class GDimension
Constructs a new dimension object with the specified components.
get_alpha(pixel) - Static method in class GImage
Returns the alpha component of the specified pixel value, which indicates its transparency.
get_ascent() - Method in class GLabel
Returns the distance this font extends above the baseline.
get_blue(pixel) - Static method in class GImage
Returns the blue component of the specified pixel value.
get_bounds() - Method in class GCompound
Returns the bounding rectangle for this compound object, which consists of the union of the bounding rectangles for each of the components.
get_bounds() - Method in class GObject
Returns the bounding rectangle for this object.
get_color() - Method in class GObject
Returns the color used to display this object.
get_descent() - Method in class GLabel
Returns the distance this font descends below the baseline.
get_element(k) - Method in class GWindow
Returns the graphical object at the specified index, numbering from back to front in the the z dimension.
get_element(k) - Method in class GCompound
Returns the graphical object at index k, numbering from back to front in the the z dimension.
get_element_at(x, y) - Method in class GCompound
Returns the topmost graphical object that contains the point (x, y), or None if no such object exists.
get_element_at(x, y) - Method in class GWindow
Returns the topmost graphical object that contains the point (x, y), or None if no such object exists.
get_element_count() - Method in class GCompound
Returns the number of graphical objects stored in this compound.
get_element_count() - Method in class GWindow
Returns the number of graphical objects stored in this GWindow.
get_end_point() - Method in class GArc
Returns the point at which the arc ends.
get_end_point() - Method in class GLine
Returns the end point of the line as a GPoint object.
get_fill_color() - Method in class GFillableObject
Returns the color used to fill this object.
get_font() - Method in class GLabel
Returns the font in which the GLabel is displayed.
get_frame_rectangle() - Method in class GArc
Returns the bounds of the GRectangle in which this arc is inscribed.
get_green(pixel) - Static method in class GImage
Returns the green component of the specified pixel value.
get_height() - Method in class GDimension
Returns the height of this GDimension.
get_height() - Method in class GDimension
Returns the height of this GDimension object.
get_height() - Method in class GObject
Returns the height of this graphical object.
get_height() - Method in class GRectangle
Returns the height of this GRectangle object.
get_height() - Method in class GWindow
Returns the height of this window in pixels.
get_key() - Method in class GKeyEvent
Returns the character that triggered the event.
get_label() - Method in class GLabel
Returns the string displayed by this object.
get_line_width() - Method in class GObject
Returns the width of the lines used to draw the object.
get_location() - Method in class GObject
Returns the location of this object as a GPoint.
get_red(pixel) - Static method in class GImage
Returns the red component of the specified pixel value.
get_size() - Method in class GObject
Returns the size of the bounding box for this object.
get_source() - Method in class GEvent
Returns the object that triggered this event.
get_start_angle() - Method in class GArc
Returns the starting angle for this GArc object.
get_start_point() - Method in class GArc
Returns the point at which the arc starts.
get_start_point() - Method in class GLine
Returns the coordinates of the initial point in the line.
get_sweep_angle() - Method in class GArc
Returns the sweep angle for this GArc object.
get_width() - Method in class GDimension
Returns the width of this GDimension.
get_width() - Method in class GObject
Returns the width of this object, which is defined to be the width of the bounding box.
get_width() - Method in class GRectangle
Returns the width of this GRectangle object.
get_width() - Method in class GWindow
Returns the width of this window in pixels.
get_x() - Method in class GMouseEvent
Returns the x coordinate of this GPoint.
get_x() - Method in class GPoint
Returns the x-coordinate of the object.
get_x() - Method in class GRectangle
Returns the x coordinate of this GRectangle.
get_x() - Method in class GMouseEvent
Returns the x coordinate of this GMouseEvent.
get_y() - Method in class GPoint
Returns the y coordinate of this GPoint.
get_y() - Method in class GObject
Returns the y-coordinate of the object.
get_y() - Method in class GRectangle
Returns the y coordinate of this GRectangle.
get_y() - Method in class GMouseEvent
Returns the y coordinate of this GMouseEvent.
GImage - Class in the Portable Graphics Library
This abstract class forms the root of the event hierarchy.
GFillableObject - Class in the Portable Graphics Library
This abstract class unifies the GObject subclasses that support filling.
GImage - Class in the Portable Graphics Library
This class displays an image.
GImage(array) - Method in class GImage
Creates a new GImage object at the origin.
GImage(filename) - Method in class GImage
Creates a new GImage object by reading an image from the specified file.
GKeyEvent - Class in the Portable Graphics Library
This class encapsulates the data associated with a key action.
GLabel - Class in the Portable Graphics Library
This class displays a text string.
GLabel(text) str) - Method in class GLabel
Creates a new GLabel object initialized to contain the specified string.
GLabel(text, x, y) - Method in class GLabel
Creates a new GLabel object with its baseline origin at the specified position.
GLine - Class in the Portable Graphics Library
This class displays a line segment.
GLine(x0, y0, x1, y1) - Method in class GLine
Constructs a line segment from its endpoints.
GMouseEvent - Class in the Portable Graphics Library
This class encapsulates the data associated with a mouse action.
GObject - Class in the Portable Graphics Library
This abstract class is the common superclass of all graphical objects.
GOval - Class in the Portable Graphics Library
This class displays an ellipse.
GOval(width, height) - Method in class GOval
Constructs a new oval with the specified width and height, positioned at the origin.
GOval(x, y, width, height) - Method in class GOval
Constructs a new oval with the specified bounds.
GPoint - Class in the Portable Graphics Library
This class encapsulates a location combining an x and a y coordinate.
GPoint(x, y) - Method in class GPoint
Constructs a new GPoint with the specified coordinates.
GPolygon - Class in the Portable Graphics Library
This class displays a polygon.
GPolygon() - Method in class GPolygon
Constructs a new empty polygon at the origin.
GRect - Class in the Portable Graphics Library
This class displays a rectangular box.
GRect(x, y) - Method in class GRect
Constructs a new rectangle with the specified width and height, positioned at the origin.
GRect(x, y, width, height) - Method in class GRect
Constructs a new rectangle with the specified bounds.
GRectangle - Class in the Portable Graphics Library
This class encapsulates the location and dimensions of a rectangle.
GRectangle(x, y, width, height) - Method in class GRectangle
Constructs a new GRectangle with the specified coordinates and size.
GState - Class in the Portable Graphics Library
This class enables clients to pass state information to callback functions.
GState() - Method in class GState
Constructs a new GState object with no attributes.
GTimer - Class in the Portable Graphics Library
This class represents a timer event.
GWindow() - Method in class GWindow
Creates a new GWindow with a default size.
GWindow(widthGWindow
height) Creates a new GWindow with the specified dimensions.

I

is_filled() - Method in class GFillableObject
Returns whether this object is filled.
is_visible() - Method in class GObject
Checks to see whether this object is visible.

M

move(dx, dy) - Method in class GObject
Moves the object on the screen using the displacements dx and dy.
move_polar(r, theta) - Method in class GObject
Moves the object using displacements given in polar coordinates.

R

remove(gobj) - Method in class GCompound
Removes a graphical object from this GCompound.
remove(gobj) - Method in class GWindow
Removes a graphical object from the window.
remove_all() - Method in class GCompound
Removes all graphical objects from this GCompound.
rotate(theta) - Method in class GObject
Rotates the object on the screen theta degrees around its origin.

S

scale(sf) - Method in class GObject
Scales the object on the screen by the scale factor sf, which applies in both dimensions.
send_backward() - Method in class GObject
Moves this object one step toward the back in the z dimension.
send_forward() - Method in class GObject
Moves this object one step toward the front in the z dimension.
send_to_back() - Method in class GObject
Moves this object to the back of the display in the z dimension.
send_to_front() - Method in class GObject
Moves this object to the front of the display in the z dimension.
set_bounds(bounds) - Method in class GOval
Changes the bounds of this GOval to the values from the specified Rectangle.
set_bounds(x, y, width, height) - Method in class GImage
Changes the bounds of this GImage to the specified values.
set_bounds(x, y, width, height) - Method in class GRect
Changes the bounds of this GRect to the specified values.
set_color(color) - Method in class GObject
Sets the color of this object.
set_end_point(x, y) - Method in class GLine
Sets the end point of the line to the point (xy).
set_fill_color(color) - Method in class GFillableObject
Sets the color used to display the filled region of this object.
set_filled(fill) - Method in class GFillableObject
Sets whether this object is filled.
set_font(font) - Method in class GLabel
Changes the font used to display the GLabel as indicated by the string font, which is interpreted in the style of CSS font specification.
set_frame_rectangle(x, y, width, height) - Method in class GArc
Changes the arc bounds to the specified values.
set_image(filename) - Method in class GImage
Resets the image used by this GImage object to the new image specified as an argument.
set_interval(fn, delay) - Method in class GWindow
Creates a new interval timer that calls fn every delay milliseconds.
set_label(text) str) - Method in class GLabel
Changes the string stored within the GLabel object, so that a new text string appears on the display.
set_line_width(width) - Method in class GObject
Sets the width of the lines used to draw the object.
set_location(x, y) - Method in class GObject
Sets the location of this object to the point (x, y).
set_size(width, height) - Method in class GImage
Changes the size of this GImage to the specified width and height.
set_size(width, height) - Method in class GOval
Changes the size of this GOval to the specified width and height.
set_size(width, height) - Method in class GRect
Changes the size of this GRect to the specified width and height.
set_start_angle(theta) - Method in class GArc
Sets the starting angle for this GArc object.
set_start_point(x, y) - Method in class GLine
Sets the initial point in the line to (xy), leaving the end point unchanged.
set_sweep_angle(sweep) - Method in class GArc
Sets the sweep angle for this GArc object.
set_timeout(fn, delay) - Method in class GWindow
Creates a new one-shot timer that calls fn after the specified delay, which is measured in milliseconds.
set_visible(flag) - Method in class GObject
Sets whether this object is visible.
start() - Method in class GTimer
Starts the timer.
stop() - Method in class GTimer
Stops the timer.

A C G I M R S