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

19990930: White background gif driver



>From: Chris Hennon <address@hidden>
>Organization: .
>Keywords: 199909301310.HAA18194

>Steve -
>
>I'd like to create white background gifs.  I found your support email
>describing how to create the xww driver so I did the same thing with the
>gf driver.  I created a gfw directory and changed the two lines in the
>makefile (PROG = gfw, ALIB = gfw.a).  However, I can't find where in the
>code I make the modifications to change the background color to white.
>Thanks ahead for any assistance.
>
>Chris  
>
>================================================
>| Chris Hennon        Ohio State University   |
>| Tropical Meteorology      address@hidden   |
>|                                              |
>| Dept of Geography   Office: 1155 Derby Hall  |
>| 1036 Derby Hall     Phone : (614) 292-2704   |
>| Columbus, OH 43210  Fax   : (614) 292-6213   |
>================================================
>


Chris,

The easiest way to create a white background is to run the
GPCOLOR programand define color 101 (the background color)
to white with:

COLORS= 101=white

Then that is defined for your display for all programs run.

Creating a gfw would save that one step.
You actually have to define color 101in the routine shared between
xw and gf called: $GEMPAKHOME/src/driver/active/xw/hsctbl.f

the subroutine reads the coltbl.xw file and then immediately after
the 1000 format line calls:
 CALL HSCRGB  ( 101, irg, igg, ibg, ier )

This call defines the background to be the same color as the first entry in the
coltbl.xw file which is black.

You could compile a separet version of this routine either defining
a different color table name, and set the first color in that
table to be white, or modify the HSCRB call so that the red, green, and
blue values are all 255- eg:
iwhite=255
call hscrb(101,iwhite, iwhite, iwhite,ier)

As I said, the first method is the easiest...and you are flexible
to make the background any color at any time.

Steve Chiswell