From f1bacb9686a4b1d3a21f1c12d40ae08ac63041a6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 20 Apr 2011 11:36:14 +0200 Subject: render_hkl: Be a bit more informative when writing the colour key --- src/render_hkl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/render_hkl.c') diff --git a/src/render_hkl.c b/src/render_hkl.c index 9ddfc3a2..cb47e680 100644 --- a/src/render_hkl.c +++ b/src/render_hkl.c @@ -34,6 +34,9 @@ #include "reflist-utils.h" +#define KEY_FILENAME "key.pdf" + + static void show_help(const char *s) { printf("Syntax: %s [options] \n\n", s); @@ -433,7 +436,7 @@ static int render_key(int colscale, double scale_top) top = 1.0; } - surface = cairo_pdf_surface_create("key.pdf", wh, ht); + surface = cairo_pdf_surface_create(KEY_FILENAME, wh, ht); if ( cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS ) { fprintf(stderr, "Couldn't create Cairo surface\n"); @@ -501,6 +504,8 @@ static int render_key(int colscale, double scale_top) cairo_surface_finish(surface); cairo_destroy(dctx); + STATUS("Colour key written to "KEY_FILENAME"\n"); + return 0; } -- cgit v1.2.3