code: func (im *Image) XPaintRects(wid xproto.Window, rects ...image.Rectangle) {
  	for _, rect := range rects {
  		if si := im.SubImage(rect).(*Image); si != nil {
  			si.XDraw()
  		}
  	}
  	im.XPaint(wid)
  }
docs: // XPaintRects is a convenience function for issuing XDraw requests on
  // each sub-image generated by the rects in the slice provided, and then
  // painting the updated pixmap all at once to the window provided.
  // This is efficient because no pixels are copied when taking a SubImage,
  // and each XDraw call on a sub-image updates the pixels represented by that
  // sub-image and only that sub-image.