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

19991029: changing Ntrans default background color



David,

I can't think of a way to change the background color for the xw.a
driver library being used in Ntrans without affecting Garp, NSat 
and other programs which access the Shared Colormap that ntl sets up.

The way to globally change the background color for the xw background is
to change the first color in $GEMTBL/colors/coltbl.xw prior to
launching ntl.

The way to force ntrans to set the background color to white within
that program is to add in ntrans.c, ~line 183 following the gg_motf()
call:

        {
        int red,green,blue;
        int colr = 101;
        int cbank = 0;
        red = green = blue = 255;
        xscrgb(&cbank, &colr, &red, &green, &blue, &ret);
        printf("check here ret %d\n",ret);
        }

Steve Chiswell
Unidata User Support




>From: David Ovens <address@hidden>
>Organization: .
>Keywords: 199910291807.MAA16528

>Steve,
>
>Thanks for the info.  Unfortunately, the easy way is fine for me, but
>too complicated for some folks in our department and the original
>plots look really disconcerting and nearly blank if you don't make the
>switch.  Also, the Active Color switch has to be done every time a
>user starts up ntrans "Save Color" does not matter between sessions.
>
>I guess what I really need to do is find out how to change ntrans's
>default from black to white.  Can you help me?
>
>Unidata Support wrote:
>> 
>> 
>> David,
>> 
>> The reason that your NC meta file does not have a white background 
>> in Ntrans even after you set color 101 to white in your application
>> which produced the nc file is that the meta file is not a picture 
>> like a gif file. Instead, it is the drawing commands that produce the
>> picture. Since the background is not "drawn", only the lines, text and
>> color fills are part of the nc metafile.
>> 
>> If you want the background color in Ntrans to be white, the simplest way to
>> do this after launching ntrans is to "click" on the "Active Colors:"
>> number 0 at the bottom of the plot. This is the background color.
>> 
>> Clicking on the color tile at the bottom of the plot will pop up a color 
>> selection widget. Click on the white "31" box in the color pallete
>> and that will change color 0 to white. Then, click on the "Save Color"
>> button and then "close".
>> 
>> Steve Chiswell
>> Unidata User Support
>> 
>> 
>> 
>> 
>> >From: David Ovens <address@hidden>
>> >Organization: .
>> >Keywords: 199910291603.KAA12700
>> 
>> >Hello,
>> >
>> >I just totally remade all of our meta files for Ntrans using a white
>> >background instead of a black one.  I ran gpcolor first and set
>> >101=white.  Now, I was hoping that when I started Ntrans and selected
>> >the appropriate meta file that it would switch automatically to a
>> >white background, unfortunately it did not -- the background is still
>> >black.  
>> >
>> >I know how to select color 0 and change it from black to white inside
>> >Ntrans, giving me the picture I want, but is there any way to change
>> >the default background color for ntrans from black to white, or,
>> >better yet, have Ntrans figure out the background color from the meta
>> >file?
>> >
>> >I also know that if I run gpcolor, set 101=white, quit it, and then
>> >start up Ntrans that this works, but I prefer to launch items from
>> >Ntl, and I don't necessarily want to change the background color for
>> >garp, nsharp, etc.
>> >
>> >If it is not possible to do what I want, could you tell me how to
>> >permanently change the default background for all gempak programs from
>> >black to white?
>> >
>> >Thank you,
>> >
>> >
>> >David
>> >-- 
>> >
>> >David Ovens         e-mail: address@hidden
>> >(206) 685-8108
>> >Dept of Atmospheric Sciences, Box 351640
>> >University of Washington 
>> >Seattle, WA  98195
>> >
>> 
>> ****************************************************************************
>> Unidata User Support                                    UCAR Unidata Program
>> (303)497-8644                                                  P.O. Box 3000
>> address@hidden                                   Boulder, CO 80307
>> ----------------------------------------------------------------------------
>> Unidata WWW Service                        http://www.unidata.ucar.edu/     
>> ****************************************************************************
>> 
>
>
>-- 
>
>David Ovens            e-mail: address@hidden
>(206) 685-8108
>Dept of Atmospheric Sciences, Box 351640
>University of Washington 
>Seattle, WA  98195
>