Pixmap object -- X Python Reference Manual

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

# 3.8. Pixmap object

Pixmap objects are used to represent the `Pixmap` type. A Pixmap object can be obtained using the widget method `CreatePixmap`.

A Pixmap is an offscreen piece of memory in which the application can draw. Drawing in the pixmap can be done using a Graphics Context object which can be created using the `CreateGC` method. The pixmap can be copied to a window or another pixmap using the `CopyArea` and `CopyPlane` methods.

Pixmap objects (pixmap_objects) have the following methods:

CopyArea (destobject, gc_object, src_x, src_y, width, height, dest_x, dest_y)
  Returns `None`. This function corresponds with `XCopyArea`.

CopyPlane (destobject, gc_object, src_x, src_y, width, height, dest_x, dest_y, plane)
  Returns `None`. This function corresponds with `XCopyPlane`.

CreateGC (gc_dict)
  Returns `gc_object`. This function corresponds with `XCreateGC`.

ReadBitmapFile (file)
  Returns `(width, height, pixmap_object, hotspot_x, hotspot_y)`. This function corresponds with `XReadBitmapFile`.

WriteBitmapFile (file, width, height[, x_hot, y_hot])
  Returns `None`. This function corresponds with `XWriteBitmapFile`.

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