Here's a complete example of how to create a background image and paste multiple images into it with pycairo. It is partially based on pyCairo: How to resize and position an image?, but extended to support image rotation.
#!/usr/bin/python
# An example of how to create a background image and paste
# multiple images into it with pycairo.
import cairo
import math
import os
def pre_translate(ctx, tx, ty):
    """Translate a cairo context without taking into account its
    scale and rotation"""
    mat = ctx.get_matrix()
    ctx.set_matrix(cairo.Matrix(mat[0],mat[1],
                                mat[2],mat[3],
                                mat[4]+tx,mat[5]+ty))
def draw_image(ctx, image, centerX, centerY, height, width, angle=0):
    """Draw a scaled image on a given context."""
    image_surface = cairo.ImageSurface.create_from_png(image)
    # calculate proportional scaling
    img_height,img_width = (image_surface.get_height(),
                            image_surface.get_height())
    scale_xy = min(1.0*width/img_width,1.0*height / img_height)
    # scale, translate, and rotate the image around its center.
    ctx.save()
    ctx.rotate(angle)
    ctx.translate(-img_width/2*scale_xy,-img_height/2*scale_xy)
    ctx.scale(scale_xy, scale_xy)
    pre_translate(ctx, centerX, centerY)
    ctx.set_source_surface(image_surface)
    ctx.paint()
    ctx.restore()
width,height=512,512
surface = cairo.ImageSurface (cairo.FORMAT_ARGB32, width, height)
cr = cairo.Context (surface)
pre_translate(cr, 0,0)
# Create the background
cr.rectangle(0,0,width,height)
cr.set_source_rgb(0,0,0.5)
cr.fill()
# Read an image
imagefile = 'tux.png'
if not os.path.exists(imagefile):
  import urllib
  urllib.urlretrieve('http://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png', imagefile)
for x in range(0,width,64):
    for y in range(0,height,64):
        angle = 1.0*(x+y)/(width+height-128)*2*math.pi
        draw_image(cr,
                   imagefile,
                   x+32,y+32,
                   64,64,
                   angle)