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:

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


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