-#include "xfig_tracer.h"
-
-#ifdef CAIRO_SUPPORT
-#include <cairo.h>
-
-static cairo_status_t write_cairo_to_file(void *closure,
- const unsigned char *data,
- unsigned int length) {
- fwrite(data, 1, length, (FILE *) closure);
- return CAIRO_STATUS_SUCCESS;
-}
-
-void generate_png(int width, int height, Universe *universe, FILE *file) {
- const int depth = 4;
- cairo_surface_t *image;
- cairo_t* context_resource;
- unsigned char *data;
- data = new unsigned char [width * height * depth];
-
- image = cairo_image_surface_create_for_data(data,
- CAIRO_FORMAT_RGB24,
- width,
- height,
- width * depth);