[GRASS-dev] quick postscript question

Hamish hamish_b at yahoo.com
Sat Feb 5 20:01:27 EST 2011


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


      


More information about the grass-dev mailing list