gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 0a6823ff: Library (eps.h): now possible to set


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 0a6823ff: Library (eps.h): now possible to set the color of the border
Date: Tue, 30 Aug 2022 14:07:28 -0400 (EDT)

branch: master
commit 0a6823ff4e0431490349405a6f4a22a1ff540e6b
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Library (eps.h): now possible to set the color of the border
    
    Until now, the color of the border produced in vector graphics outputs
    (like EPS or PDF) was fixed (black). But when producing figures, it is
    sometimes necessary to customize the border's color.
    
    With this commit, a new argument has been added to the 'gal_eps_write'
    function to allow the caller to set the color of the border. Using this
    feature, the ConvertType program now has an option called '--bordercolor'
    to let the user easily select their desired color for the border. The
    default value for the border color is black (in ConvertType's system-wide
    configuration file).
---
 NEWS                            |  5 +++-
 bin/convertt/args.h             | 56 +++++++++++++++++++++++++----------------
 bin/convertt/astconvertt.conf   |  1 +
 bin/convertt/convertt.c         |  5 ++--
 bin/convertt/main.h             |  1 +
 bin/convertt/ui.h               |  3 ++-
 doc/gnuastro.texi               | 21 +++++++++++++---
 lib/eps.c                       |  8 +++---
 lib/gnuastro-internal/options.h |  4 +++
 lib/gnuastro/eps.h              |  5 ++--
 lib/gnuastro/pdf.h              |  4 +--
 lib/options.c                   | 39 ++++++++++++++++++++++++++++
 lib/pdf.c                       |  8 +++---
 13 files changed, 119 insertions(+), 41 deletions(-)

diff --git a/NEWS b/NEWS
index c3c9887d..ef81f548 100644
--- a/NEWS
+++ b/NEWS
@@ -61,6 +61,8 @@ See the end of the file for license conditions.
     --showfonts: build a demo PDF with one page per font to show the
                  various available fonts on the system.
     --listfonts: List the names of the available fonts on the terminal.
+  - It is now possible to select the color of the border of images produced
+    in vector graphics outputs (EPS and PDF) with '--bordercolor'.
 
   Fits:
   --pixelareaarcsec2: print the image pixel area in units of arcsec^2 to
@@ -143,7 +145,8 @@ See the end of the file for license conditions.
     remembering.
 
   Library
-  - gal_eps_write: an extra argument has been added to draw marks.
+  - gal_eps_write: two new arguments have been added to draw marks, and to
+        set the border color.
   - gal_pdf_write: similar to 'gal_eps_write'.
   - gal_fits_hdu_open: new argument to optionally exit program if HDU
         couldn't be opened.
diff --git a/bin/convertt/args.h b/bin/convertt/args.h
index 7728d85e..73215c05 100644
--- a/bin/convertt/args.h
+++ b/bin/convertt/args.h
@@ -238,7 +238,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Vector graphics (only for EPS or PDF outputs)",
-      UI_GROUP_MARKS
+      UI_GROUP_VECTOR
     },
     {
       "borderwidth",
@@ -246,20 +246,34 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Border width in units of points (1/72 inch).",
-      GAL_OPTIONS_GROUP_OUTPUT,
+      UI_GROUP_VECTOR,
       &p->borderwidth,
       GAL_TYPE_UINT32,
       GAL_OPTIONS_RANGE_GE_0,
       GAL_OPTIONS_NOT_MANDATORY,
       GAL_OPTIONS_NOT_SET
     },
+    {
+      "bordercolor",
+      UI_GROUP_VECTOR,
+      "STR",
+      0,
+      "Name of color to use for the border.",
+      GAL_OPTIONS_GROUP_OUTPUT,
+      &p->bordercolor,
+      GAL_TYPE_UINT8,
+      GAL_OPTIONS_RANGE_GE_0,
+      GAL_OPTIONS_NOT_MANDATORY,
+      GAL_OPTIONS_NOT_SET,
+      gal_options_read_color
+    },
     {
       "marks",
       UI_KEY_MARKS,
       "STR",
       0,
       "Name of mark information table.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->marksname,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -272,7 +286,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "HDU in '--marks' (if its a FITS file).",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->markshdu,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -285,7 +299,7 @@ struct argp_option program_options[] =
       "STR,STR",
       0,
       "Name or Number of columns with coordinates.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->markcoords,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -298,7 +312,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Coordinate mode for marks ('wcs' or 'img').",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->mode,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -313,7 +327,7 @@ struct argp_option program_options[] =
       "Name or Number of col. with mark shapes: circle (1), "
       "plus (2), cross (3), ellipse (4), point(5), square (6) "
       "rectangle (7) and line (8).",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->markshape,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -326,7 +340,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Name or Num. of col. with mark rotation.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->markrotate,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -339,7 +353,7 @@ struct argp_option program_options[] =
       "STR[,STR]",
       0,
       "Name or Number of cols. with mark size(s).",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->marksize,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -352,7 +366,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Size col. values are in pixels (in WCS-mode).",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->sizeinpix,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -365,7 +379,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Size col. values are in arcsec (in WCS-mode).",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->sizeinarcsec,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -378,7 +392,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Size col. values are in arcmin (in WCS-mode).",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->sizeinarcmin,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -391,7 +405,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Name or Number of col. with line width.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->marklinewidth,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -404,7 +418,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Name or Number of col. with mark color. ",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->markcolor,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -417,7 +431,7 @@ struct argp_option program_options[] =
       0,
       0,
       "List names and RGB info of all colors.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->listcolors,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -430,7 +444,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Name or Num. of col. with mark text.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->marktext,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -443,7 +457,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Number decimals when text is float column.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->marktextprecision,
       GAL_TYPE_UINT8,
       GAL_OPTIONS_RANGE_ANY,
@@ -456,7 +470,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Name or Num. of col. with mark font name.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->markfont,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -469,7 +483,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Name or Num. of col. with mark font size.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->markfontsize,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -482,7 +496,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Show all fonts in a PDF.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->showfonts,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -495,7 +509,7 @@ struct argp_option program_options[] =
       0,
       0,
       "List names of available fonts.",
-      UI_GROUP_MARKS,
+      UI_GROUP_VECTOR,
       &p->listfonts,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
diff --git a/bin/convertt/astconvertt.conf b/bin/convertt/astconvertt.conf
index d41036a1..be8f48b1 100644
--- a/bin/convertt/astconvertt.conf
+++ b/bin/convertt/astconvertt.conf
@@ -25,6 +25,7 @@
  quality              100
  widthincm            10.0
  borderwidth          1
+ bordercolor          black
  output               output.jpg
  colormap             gray
 
diff --git a/bin/convertt/convertt.c b/bin/convertt/convertt.c
index 2aa0f284..a7985f68 100644
--- a/bin/convertt/convertt.c
+++ b/bin/convertt/convertt.c
@@ -350,14 +350,15 @@ convertt(struct converttparams *p)
     case OUT_FORMAT_EPS:
       if(p->colormap) color_map_prepare(p); else convertt_scale_to_uchar(p);
       gal_eps_write(p->chll, p->cp.output, p->widthincm, p->borderwidth,
-                    p->hex, p->forcemin || p->forcemax, 0, p->marks);
+                    p->bordercolor, p->hex, p->forcemin || p->forcemax,
+                    0, p->marks);
       break;
 
     /* PDF */
     case OUT_FORMAT_PDF:
       if(p->colormap) color_map_prepare(p); else convertt_scale_to_uchar(p);
       gal_pdf_write(p->chll, p->cp.output, p->widthincm, p->borderwidth,
-                    p->forcemin || p->forcemax, p->marks);
+                    p->bordercolor, p->forcemin || p->forcemax, p->marks);
       break;
 
     /* Not recognized. */
diff --git a/bin/convertt/main.h b/bin/convertt/main.h
index 1cc439e3..f041f229 100644
--- a/bin/convertt/main.h
+++ b/bin/convertt/main.h
@@ -87,6 +87,7 @@ struct converttparams
   uint8_t           quality;  /* Quality of JPEG image.                */
   float           widthincm;  /* Width in centimeters.                 */
   uint32_t      borderwidth;  /* Width of border in PostScript points. */
+  uint8_t       bordercolor;  /* Color of the border.                  */
   uint8_t               hex;  /* Use hexadecimal not ASCII85 encoding. */
   gal_data_t      *colormap;  /* Color space to use for single/mono.   */
   uint8_t          rgbtohsv;  /* Convert input RGB channels to HSV.    */
diff --git a/bin/convertt/ui.h b/bin/convertt/ui.h
index 19532115..991e6bef 100644
--- a/bin/convertt/ui.h
+++ b/bin/convertt/ui.h
@@ -34,7 +34,7 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 enum program_args_groups
 {
   UI_GROUP_FLUX = GAL_OPTIONS_GROUP_AFTER_COMMON,
-  UI_GROUP_MARKS
+  UI_GROUP_VECTOR
 };
 
 
@@ -69,6 +69,7 @@ enum option_keys_enum
      automatically). */
   UI_KEY_COLORMAP            = 1000,
   UI_KEY_RGBTOHSV,
+  UI_KEY_BORDERCOLOR,
   UI_KEY_MARKS,
   UI_KEY_MARKSHDU,
   UI_KEY_MARKSIZE,
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index b59e83e3..b173f0a4 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -13588,6 +13588,16 @@ To have a final border that is thinner than one 
PostScript point in your documen
 For example by setting @command{width} in your @command{includegraphics} 
command in @TeX{} or @LaTeX{} to be larger than the value to 
@option{--widthincm}.
 Since it is vector graphics, the changes of size have no effect on the quality 
of your output (pixels do not get different values).
 
+@item --bordercolor=STR
+The name of the color to use for border that will be put around the EPS and 
PDF outputs.
+The list of available colors, along with their name and an example can be seen 
with the following command (also see @ref{Vector graphics colors}):
+
+@example
+$ astconvertt --listcolors
+@end example
+
+This option only accepts the name of the color, not the numeric identifier.
+
 @item --marks=STR
 Draw vector graphics (infinite resolution) marks over the image.
 The value to this option should be the file name of a table containing the 
mark information.
@@ -32486,12 +32496,13 @@ Return the shape ID of a mark from its name (which is 
not case-sensitive).
 Return the shape name from its ID.
 @end deftypefun
 
-@deftypefun {void} gal_eps_write (gal_data_t @code{*in}, char 
@code{*filename}, float @code{widthincm}, uint32_t @code{borderwidth}, int 
@code{hex}, int @code{dontoptimize}, int @code{forps}, gal_data_t @code{*marks})
+@deftypefun {void} gal_eps_write (gal_data_t @code{*in}, char 
@code{*filename}, float @code{widthincm}, uint32_t @code{borderwidth}, uint8_t 
@code{bordercolor}, int @code{hex}, int @code{dontoptimize}, int @code{forps}, 
gal_data_t @code{*marks})
 Write the @code{in} dataset into an EPS file called @code{filename}.
 @code{in} has to be an unsigned 8-bit character type @code{GAL_TYPE_UINT8}, 
see @ref{Numeric data types}).
-The desired width of he image in human/non-pixel units (to help the displayer) 
can be set with he @code{widthincm} argument.
+The desired width of the image in human/non-pixel units (to help the 
displayer) can be set with he @code{widthincm} argument.
 If @code{borderwidth} is non-zero, it is nterpreted as the width (in points) 
of a solid black border around the mage.
 A border can helpful when importing the EPS file into a document.
+The color of the border can be set with @code{bordercolor}, use the macros in 
@ref{Color functions}.
 If @code{forpdf} is not zero, the output can be imported into a Postscript 
file directly (not as an ``encapsulated'' postscript, which is the default).
 
 @cindex ASCII85 encoding
@@ -32543,12 +32554,13 @@ Return @code{1} if @code{suffix} is a recognized PDF 
suffix.
 The recognized suffixes are @code{.pdf} and @code{.PDF}.
 @end deftypefun
 
-@deftypefun {void} gal_pdf_write (gal_data_t @code{*in}, char 
@code{*filename}, float @code{widthincm}, uint32_t @code{borderwidth}, int 
@code{dontoptimize}, gal_data_t @code{*marks})
+@deftypefun {void} gal_pdf_write (gal_data_t @code{*in}, char 
@code{*filename}, float @code{widthincm}, uint32_t @code{borderwidth}, uint8_t 
@code{bordercolor}, int @code{dontoptimize}, gal_data_t @code{*marks})
 Write the @code{in} dataset into an EPS file called @code{filename}.
 @code{in} has to be an unsigned 8-bit character type (@code{GAL_TYPE_UINT8}, 
see @ref{Numeric data types}).
 The desired width of the image in human/non-pixel units (to help the 
displayer) can be set with the @code{widthincm} argument.
 If @code{borderwidth} is non-zero, it is interpreted as the width (in points) 
of a solid black border around the image.
 A border can helpful when importing the PDF file into a document.
+The color of the border can be set with @code{bordercolor}, use the macros in 
@ref{Color functions}.
 
 This function is just a wrapper for the @code{gal_eps_write} function in 
@ref{EPS files}.
 After making the EPS file, Ghostscript (with a version of 9.10 or above, see 
@ref{Optional dependencies}) will be used to compile the EPS file to a PDF file.
@@ -35798,7 +35810,8 @@ For each color we have a separate macro that starts 
with @code{GAL_COLOR_}, and
 @deffnx Macro GAL_COLOR_*
 The integer identifiers for each of the named colors in Gnuastro.
 Except for the first one (@code{GAL_COLOR_INVALID}), we currently have 140 
colors from the @url{https://en.wikipedia.org/wiki/Web_colors#Extended_colors, 
extended web colors}.
-The full list of colors and a demo is shown in @ref{Vector graphics colors}.
+The full list of colors and a demo can be visually inspected on the 
command-line with the @command{astconvertt --listcolors} command and is also 
shown in @ref{Vector graphics colors}.
+The macros have the same names, just in full-caps.
 @end deffn
 
 @noindent
diff --git a/lib/eps.c b/lib/eps.c
index 61c0d220..fb562c38 100644
--- a/lib/eps.c
+++ b/lib/eps.c
@@ -1016,11 +1016,12 @@ eps_mark_add(gal_data_t *in, gal_data_t *marks, FILE 
*fp,
 
 void
 gal_eps_write(gal_data_t *in, char *filename, float widthincm,
-              uint32_t borderwidth, int hex, int dontoptimize,
-              int forps, gal_data_t *marks)
+              uint32_t borderwidth, uint8_t bordercolor, int hex,
+              int dontoptimize, int forps, gal_data_t *marks)
 {
   FILE *fp;
   float hbw;
+  float rgb[3];
   time_t rawtime;
   size_t numch=gal_list_data_number(in);
   size_t w_h_in_pt[2], *dsize=in->dsize;
@@ -1075,8 +1076,9 @@ gal_eps_write(gal_data_t *in, char *filename, float 
widthincm,
     /* Commands to draw the border: */
   if(borderwidth)
     {
+      gal_color_in_rgb(bordercolor, rgb);
       fprintf(fp, "%% Draw the border:\n");
-      fprintf(fp, "0 setgray\n");
+      fprintf(fp, "%.2f %.2f %.2f setrgbcolor\n", rgb[0], rgb[1], rgb[2]);
       fprintf(fp, "%d setlinewidth\n", borderwidth);
       fprintf(fp, "%.1f %.1f moveto\n", hbw, hbw);
       fprintf(fp, "0 %zu rlineto\n", w_h_in_pt[1]+borderwidth);
diff --git a/lib/gnuastro-internal/options.h b/lib/gnuastro-internal/options.h
index ef13b304..c29fa447 100644
--- a/lib/gnuastro-internal/options.h
+++ b/lib/gnuastro-internal/options.h
@@ -273,6 +273,10 @@ void *
 gal_options_read_type(struct argp_option *option, char *arg,
                       char *filename, size_t lineno, void *junk);
 
+void *
+gal_options_read_color(struct argp_option *option, char *arg,
+                       char *filename, size_t lineno, void *junk);
+
 void *
 gal_options_read_searchin(struct argp_option *option, char *arg,
                           char *filename, size_t lineno, void *junk);
diff --git a/lib/gnuastro/eps.h b/lib/gnuastro/eps.h
index e6cb7223..bcb875a5 100644
--- a/lib/gnuastro/eps.h
+++ b/lib/gnuastro/eps.h
@@ -123,9 +123,8 @@ gal_eps_shape_id_to_name(uint8_t id);
 
 void
 gal_eps_write(gal_data_t *in, char *filename, float widthincm,
-              uint32_t borderwidth, int hex, int dontoptimize,
-              int forpdf, gal_data_t *marks);
-
+              uint32_t borderwidth, uint8_t bordercolor, int hex,
+              int dontoptimize, int forps, gal_data_t *marks);
 
 
 __END_C_DECLS    /* From C++ preparations */
diff --git a/lib/gnuastro/pdf.h b/lib/gnuastro/pdf.h
index 8afbec01..3b736434 100644
--- a/lib/gnuastro/pdf.h
+++ b/lib/gnuastro/pdf.h
@@ -62,8 +62,8 @@ gal_pdf_suffix_is_pdf(char *name);
 
 void
 gal_pdf_write(gal_data_t *in, char *filename, float widthincm,
-              uint32_t borderwidth, int dontoptimize,
-              gal_data_t *marks);
+              uint32_t borderwidth, uint8_t bordercolor,
+              int dontoptimize, gal_data_t *marks);
 
 
 
diff --git a/lib/options.c b/lib/options.c
index 34fed5b6..da70c522 100644
--- a/lib/options.c
+++ b/lib/options.c
@@ -38,6 +38,7 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #include <gnuastro/table.h>
 #include <gnuastro/blank.h>
 #include <gnuastro/units.h>
+#include <gnuastro/color.h>
 #include <gnuastro/threads.h>
 #include <gnuastro/pointer.h>
 #include <gnuastro/arithmetic.h>
@@ -439,6 +440,44 @@ gal_options_read_type(struct argp_option *option, char 
*arg,
 
 
 
+void *
+gal_options_read_color(struct argp_option *option, char *arg,
+                       char *filename, size_t lineno, void *junk)
+{
+  char *str;
+  if(lineno==-1)
+    {
+      /* Note that 'gal_data_type_as_string' returns a static string. But
+         the output must be an allocated string so we can free it. */
+      gal_checkset_allocate_copy(
+           gal_color_id_to_name( *(uint8_t *)(option->value)), &str);
+      return str;
+    }
+  else
+    {
+      /* If the option is already set, just return. */
+      if(option->set) return NULL;
+
+      /* Read the value. */
+      if ( (*(uint8_t *)(option->value) = gal_color_name_to_id(arg) )
+           == GAL_COLOR_INVALID )
+        error_at_line(EXIT_FAILURE, 0, filename, lineno, "'%s' (value to "
+                      "'%s' option) couldn't be recognized as a known "
+                      "color.\n\nFor the full list of known types, please "
+                      "run the following command:\n\n"
+                      "    $ astconvertt --listcolors\n",
+                      arg, option->name);
+
+      /* For no un-used variable warning. This function doesn't need the
+         pointer.*/
+      return junk=NULL;
+    }
+}
+
+
+
+
+
 void *
 gal_options_read_searchin(struct argp_option *option, char *arg,
                           char *filename, size_t lineno, void *junk)
diff --git a/lib/pdf.c b/lib/pdf.c
index c55b2de2..ffa11e8d 100644
--- a/lib/pdf.c
+++ b/lib/pdf.c
@@ -100,16 +100,16 @@ gal_pdf_suffix_is_pdf(char *name)
  *************************************************************/
 void
 gal_pdf_write(gal_data_t *in, char *filename, float widthincm,
-              uint32_t borderwidth, int dontoptimize,
-              gal_data_t *marks)
+              uint32_t borderwidth, uint8_t bordercolor,
+              int dontoptimize, gal_data_t *marks)
 {
   size_t w_h_in_pt[2];
   char *command, *device;
   char *epsname=gal_checkset_malloc_cat(filename, ".ps");
 
   /* Write the EPS file. */
-  gal_eps_write(in, epsname, widthincm, borderwidth, 0,
-                dontoptimize, 0, marks);
+  gal_eps_write(in, epsname, widthincm, borderwidth,
+                bordercolor, 0, dontoptimize, 0, marks);
 
   /* Get the size of the image in 'pt' units. */
   gal_eps_to_pt(widthincm, in->dsize, w_h_in_pt);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]