code: func NewDrawable(X *xgbutil.XUtil, did xproto.Drawable) (*Image, error) {
  	// Get the geometry of the pixmap for use in the GetImage request.
  	pgeom, err := xwindow.RawGeometry(X, xproto.Drawable(did))
  	if err != nil {
  		return nil, err
  	}
  
  	// Get the image data for each pixmap.
  	pixmapData, err := xproto.GetImage(X.Conn(), xproto.ImageFormatZPixmap,
  		did,
  		0, 0, uint16(pgeom.Width()), uint16(pgeom.Height()),
  		(1<<32)-1).Reply()
  	if err != nil {
  		return nil, err
  	}
  
  	// Now create the xgraphics.Image and populate it with data from
  	// pixmapData and maskData.
  	ximg := New(X, image.Rect(0, 0, pgeom.Width(), pgeom.Height()))
  
  	// We'll try to be a little flexible with the image format returned,
  	// but not completely flexible.
  	err = readDrawableData(X, ximg, did, pixmapData,
  		pgeom.Width(), pgeom.Height())
  	if err != nil {
  		return nil, err
  	}
  
  	return ximg, nil
  }
docs: // NewDrawable converts an X drawable into a xgraphics.Image.
  // This is used in NewIcccmIcon.