Index: configure.in =================================================================== --- configure.in (révision 2059) +++ configure.in (copie de travail) @@ -382,7 +382,7 @@ SAVE_LIBS=$LIBS LIBS="$GOFFICE_LIBS $LIBS" -AC_CHECK_FUNCS(cairo_surface_set_fallback_resolution) +AC_CHECK_FUNCS(cairo_surface_set_fallback_resolution cairo_ps_surface_set_eps) LIBS=$SAVE_LIBS SAVE_CFLAGS=$CFLAGS Index: goffice/utils/go-image.h =================================================================== --- goffice/utils/go-image.h (révision 2059) +++ goffice/utils/go-image.h (copie de travail) @@ -38,6 +38,7 @@ GO_IMAGE_FORMAT_PS, GO_IMAGE_FORMAT_EMF, GO_IMAGE_FORMAT_WMF, + GO_IMAGE_FORMAT_EPS, GO_IMAGE_FORMAT_UNKNOWN } GOImageFormat; Index: goffice/graph/gog-graph.c =================================================================== --- goffice/graph/gog-graph.c (révision 2059) +++ goffice/graph/gog-graph.c (copie de travail) @@ -1019,6 +1019,9 @@ gog_graph_get_supported_image_formats (void) { static GOImageFormat supported_formats[] = { +#ifdef HAVE_CAIRO_PS_SURFACE_SET_EPS + GO_IMAGE_FORMAT_EPS, +#endif #ifdef GOG_RENDERER_CAIRO_WITH_PS GO_IMAGE_FORMAT_PS, #endif Index: goffice/graph/gog-renderer.c =================================================================== --- goffice/graph/gog-renderer.c (révision 2059) +++ goffice/graph/gog-renderer.c (copie de travail) @@ -1450,6 +1450,7 @@ gog_graph_get_size (rend->model, &width_in_pts, &height_in_pts); switch (format) { + case GO_IMAGE_FORMAT_EPS: case GO_IMAGE_FORMAT_PDF: case GO_IMAGE_FORMAT_PS: case GO_IMAGE_FORMAT_SVG: @@ -1497,6 +1498,21 @@ g_warning ("[GogRendererCairo::export_image] cairo SVG backend missing"); return FALSE; #endif + case GO_IMAGE_FORMAT_EPS: + rend->marker_as_surface = FALSE; +#ifdef HAVE_CAIRO_PS_SURFACE_SET_EPS + surface = cairo_ps_surface_create_for_stream + (_cairo_write_func, + output, width_in_pts, height_in_pts); + cairo_ps_surface_set_eps (surface, TRUE); +#ifdef HAVE_CAIRO_SURFACE_SET_FALLBACK_RESOLUTION + cairo_surface_set_fallback_resolution (surface, x_dpi, y_dpi); +#endif + break; +#else + g_warning ("[GogRendererCairo::export_image] cairo EPS backend missing"); + return FALSE; +#endif default: break; }