Using XCB surfaces with xcffib

The cairocffi.xcb module uses xcffib as the XCB library to create graphics for X windows and pixmaps.

class cairocffi.xcb.XCBSurface(conn, drawable, visual, width, height)

The XCB surface is used to render cairo graphics to X Window System windows and pixmaps using the XCB library.

Creates a cairo surface that targets the given drawable (pixmap or window).

Note

This class works using objects and libraries in xcffib.

Parameters:
  • conn – The xcffib.Connection for an open XCB connection

  • drawable – An XID corresponding to an XCB drawable (a pixmap or a window)

  • visual – An xcffib.xproto.VISUALTYPE object.

  • width – integer

  • height – integer