Skip to content

Commit

Permalink
use msIO for cairo output, correct rsvg version check
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Jul 29, 2013
1 parent 7f3e75c commit e658073
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mapcairo.c
Expand Up @@ -47,7 +47,7 @@
#ifndef LIBRSVG_CHECK_VERSION #ifndef LIBRSVG_CHECK_VERSION
#include <librsvg/librsvg-features.h> #include <librsvg/librsvg-features.h>
#endif #endif
#if !LIBRSVG_CHECK_VERSION(2,36,2) #ifndef RSVG_CAIRO_H
#include <librsvg/rsvg-cairo.h> #include <librsvg/rsvg-cairo.h>
#endif #endif
#include <glib-object.h> #include <glib-object.h>
Expand Down Expand Up @@ -882,7 +882,7 @@ int saveImageCairo(imageObj *img, mapObj *map, FILE *fp, outputFormatObj *format
if (map != NULL && !strcasecmp(img->format->driver,"cairo/pdf")) if (map != NULL && !strcasecmp(img->format->driver,"cairo/pdf"))
msTransformToGeospatialPDF(img, map, r); msTransformToGeospatialPDF(img, map, r);


fwrite(r->outputStream->data,r->outputStream->size,1,fp); msIO_fwrite(r->outputStream->data,r->outputStream->size,1,fp);
} else { } else {
/* not supported */ /* not supported */
} }
Expand Down Expand Up @@ -1076,7 +1076,7 @@ void freeSVGCache(symbolObj *s) {
svg_cairo_destroy(cache->svgc); svg_cairo_destroy(cache->svgc);
#else #else
rsvg_handle_close(cache->svgc, NULL); rsvg_handle_close(cache->svgc, NULL);
#if LIBRSVG_CHECK_VERSION(2,36,2) #if LIBRSVG_CHECK_VERSION(2,35,0)
g_object_unref(cache->svgc); g_object_unref(cache->svgc);
#else #else
rsvg_handle_free(cache->svgc); rsvg_handle_free(cache->svgc);
Expand Down

0 comments on commit e658073

Please sign in to comment.