Next: Colormap object Prev: Image object Up: Xt Top: Top

3.6. Graphics Context object

All Graphics Context objects have methods that perform drawing operations. They are listed here, with the argument types they expect. XPoint is a pair of integers; XRectangle is a tuple of four integers; XSegment is a tuple of four integers; XArc is a tuple of six integers; type[] stands for a list of type objects.

All GC objects have data attributes representing the individual values. These are gc.line_width, gc.line_style, etc. (The dash attribute is not supported.) These attributes can be assigned to if the GC object is writable.

The Pixmap arguments are Pixmap objects; the Font arguments are Font objects; the Image arguments are Image objects.

Graphics Context objects (gc_objects) have the following methods and variables:

ChangeGC (gc_dict) -- Method on Graphics Context object
Returns None. This function corresponds with XChangeGC.
DrawArc (x, y, width, height, angle1, angle2) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawArc.
DrawArcs (XArc[]) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawArcs.
DrawImageString (x, y, string) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawImageString.
DrawLine (x1, y1, x2, y2) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawLine.
DrawLines (XPoint[], mode) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawLines.
DrawPoint (x, y) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawPoint.
DrawPoints (XPoint[], mode) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawPoints.
DrawRectangle (x, y, width, height) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawRectangle.
DrawRectangles (XRectangle[]) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawRectangles.
DrawSegments (XSegment[]) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawSegments.
DrawString (x, y, string) -- Method on Graphics Context object
Returns None. This function corresponds with XDrawString.
FillArc (x, y, width, height, angle1, angle2) -- Method on Graphics Context object
Returns None. This function corresponds with XFillArc.
FillArcs (XArc[]) -- Method on Graphics Context object
Returns None. This function corresponds with XFillArcs.
FillPolygon (XPoint[], shape, mode) -- Method on Graphics Context object
Returns None. This function corresponds with XFillPolygon.
FillRectangle (x, y, width, height) -- Method on Graphics Context object
Returns None. This function corresponds with XFillRectangle.
FillRectangles (XRectangle[]) -- Method on Graphics Context object
Returns None. This function corresponds with XFillRectangles.
PutImage (Image, src_x, src_y, dest_x, dest_y, width, height) -- Method on Graphics Context object
Returns None. This function corresponds with XPutImage.
SetArcMode (arc_mode) -- Method on Graphics Context object
Returns None. This function corresponds with XSetArcMode.
SetBackground (background) -- Method on Graphics Context object
Returns None. This function corresponds with XSetBackground.
SetClipMask (Pixmap) -- Method on Graphics Context object
Returns None. This function corresponds with XSetClipMask.
SetClipOrigin (clip_x_origin, clip_y_origin) -- Method on Graphics Context object
Returns None. This function corresponds with XSetClipOrigin.
SetClipRectangles (clip_x_origin, clip_y_origin, rectangle_list, ordering) -- Method on Graphics Context object
Returns None. This function corresponds with XSetClipRectangles.
SetDashes (dash_offset, dash_list) -- Method on Graphics Context object
Returns None. This function corresponds with XSetDashes.
SetFillRule (fill_rule) -- Method on Graphics Context object
Returns None. This function corresponds with XSetFillRule.
SetFillStyle (fill_style) -- Method on Graphics Context object
Returns None. This function corresponds with XSetFillStyle.
SetFont (font_object) -- Method on Graphics Context object
Returns None. This function corresponds with XSetFont.
SetForeground (foreground) -- Method on Graphics Context object
Returns None. This function corresponds with XSetForeground.
SetFunction (function) -- Method on Graphics Context object
Returns None. This function corresponds with XSetFunction.
SetGraphicsExposures (graphics_exposure) -- Method on Graphics Context object
Returns None. This function corresponds with XSetGraphicsExposures.
SetLineAttributes (line_width, line_style, cap_style, join_style) -- Method on Graphics Context object
Returns None. This function corresponds with XSetLineAttributes.
SetPlaneMask (plane_mask) -- Method on Graphics Context object
Returns None. This function corresponds with XSetPlaneMask.
SetState (foreground, background, function, plane_mask) -- Method on Graphics Context object
Returns None. This function corresponds with XSetState.
SetStipple (stipple) -- Method on Graphics Context object
Returns None. This function corresponds with XSetStipple.
SetSubwindowMode (subwindow_mode) -- Method on Graphics Context object
Returns None. This function corresponds with XSetSubwindowMode.
SetTSOrigin (ts_x_origin, ts_y_origin) -- Method on Graphics Context object
Returns None. This function corresponds with XSetTSOrigin.
SetTile (tile) -- Method on Graphics Context object
Returns None. This function corresponds with XSetTile.
arc_mode -- attribute of Graphics Context object
Field in XGCValues structure.
background -- attribute of Graphics Context object
Field in XGCValues structure.
cap_style -- attribute of Graphics Context object
Field in XGCValues structure.
clip_mask -- attribute of Graphics Context object
Field in XGCValues structure.
clip_x_origin -- attribute of Graphics Context object
Field in XGCValues structure.
clip_y_origin -- attribute of Graphics Context object
Field in XGCValues structure.
dash_offset -- attribute of Graphics Context object
Field in XGCValues structure.
file_style -- attribute of Graphics Context object
Field in XGCValues structure.
fill_rule -- attribute of Graphics Context object
Field in XGCValues structure.
font -- attribute of Graphics Context object
Field in XGCValues structure.
foreground -- attribute of Graphics Context object
Field in XGCValues structure.
function -- attribute of Graphics Context object
Field in XGCValues structure.
graphics_exposures -- attribute of Graphics Context object
Field in XGCValues structure.
join_style -- attribute of Graphics Context object
Field in XGCValues structure.
line_style -- attribute of Graphics Context object
Field in XGCValues structure.
line_width -- attribute of Graphics Context object
Field in XGCValues structure.
plane_mask -- attribute of Graphics Context object
Field in XGCValues structure.
stipple -- attribute of Graphics Context object
Field in XGCValues structure.
subwindow_mode -- attribute of Graphics Context object
Field in XGCValues structure.
tile -- attribute of Graphics Context object
Field in XGCValues structure.
ts_x_origin -- attribute of Graphics Context object
Field in XGCValues structure.
ts_y_origin -- attribute of Graphics Context object
Field in XGCValues structure.