cairo_pattern_t *pattern;
_cairo_pdf_surface_composite_trapezoids (cairo_operator_t	operator,					 cairo_surface_t	*generic_src,					 void			*abstract_dst,					 int			x_src,					 int			y_src,					 cairo_trapezoid_t	*traps,					 int			num_traps){    cairo_pdf_surface_t *surface = abstract_dst;    cairo_pdf_surface_t *source = (cairo_pdf_surface_t *) generic_src;    cairo_pdf_document_t *document = surface->document;    cairo_pattern_t *pattern;    FILE *file = document->file;    int i;    unsigned int alpha;    /* FIXME: we really just want the original pattern here, not a     * source surface. */    pattern = source->pattern;    if (source->base.backend != &cairo_pdf_surface_backend) {	printf ("_cairo_pdf_surface_composite_trapezoids: not a pdf source\r");	return CAIRO_STATUS_SUCCESS;    }    if (pattern == NULL) {	printf ("_cairo_pdf_surface_composite_trapezoids: "		"non-pattern pdf source\r");	return CAIRO_STATUS_SUCCESS;    }    switch (pattern->type) {    case CAIRO_PATTERN_SOLID:		alpha = _cairo_pdf_surface_add_alpha (surface, pattern->color.alpha);	_cairo_pdf_surface_ensure_stream (surface);	fprintf (file, 		 "%f %f %f rg /a%d gs\r\n",		 pattern->color.red,		 pattern->color.green,		 pattern->color.blue,		 alpha);	break;    case CAIRO_PATTERN_SURFACE:	emit_tiling_pattern (operator, surface, pattern);	break;    case CAIRO_PATTERN_LINEAR:	emit_linear_pattern (surface, pattern);	break;    case CAIRO_PATTERN_RADIAL:	emit_radial_pattern (surface, pattern );	break;	        }    /* After the above switch the current stream should belong to this     * surface, so no need to _cairo_pdf_surface_ensure_stream() */    assert (document->current_stream != NULL &&	    document->current_stream == surface->current_stream);    for (i = 0; i < num_traps; i++) {	double left_x1, left_x2, right_x1, right_x2;	left_x1  = intersect (&traps[i].left, traps[i].top);	left_x2  = intersect (&traps[i].left, traps[i].bottom);	right_x1 = intersect (&traps[i].right, traps[i].top);	right_x2 = intersect (&traps[i].right, traps[i].bottom);	fprintf (file, 		 "%f %f m %f %f l %f %f l %f %f l h\r\n",		 left_x1, _cairo_fixed_to_double (traps[i].top),		 left_x2, _cairo_fixed_to_double (traps[i].bottom),		 right_x2, _cairo_fixed_to_double (traps[i].bottom),		 right_x1, _cairo_fixed_to_double (traps[i].top));    }    fprintf (file, 	     "f\r\n");    return CAIRO_STATUS_SUCCESS;}