[GRASS-dev] quick postscript question

hi,

re. full RGB support for ps.map/ps_clrtbl.c, how to change the
box outline color using the same RGB triplet as the text?
right now it is locked to black, which isn't so good if you
are drawing on a black background.

(simplified) C code looks like:

               /* set fill color */
               fprintf(PS.fp, "%.3f %.3f %.3f C\n",
                       (double)R / 255., (double)G / 255.,
                       (double)B / 255.);
               /* draw box */
               fprintf(PS.fp, "%.1f ", x1);
               fprintf(PS.fp, "%.1f ", y);
               fprintf(PS.fp, "%.1f ", x2);
               fprintf(PS.fp, "%.1f ", y + fontsize);
               fprintf(PS.fp, "B F BW stroke\n");

I assume I've got to modify the "B F BW" before the stroke, but not
sure what to, and can't find any decent reference for it on a search
of the 'net.
I could figure out that "F" means to fill the box.

?

thanks,
Hamish

Hamish wrote:

fprintf(PS.fp, "B F BW stroke\n");

I assume I've got to modify the "B F BW" before the stroke,
but not sure what to, and can't find any decent reference for
it on a search of the 'net.
I could figure out that "F" means to fill the box.

nevermind, they are just some local macros:

% set color to black, line width to 1
/BW {0 0 0 C 1 W} BD

% fill interior of current path with current color
/F {gsave fill grestore} BD

% closepath fill operator
/CF {closepath fill} BD

got it working now.

Hamish