Details Ticket 1559


Comment | Reply | Take | Open


Serial Number 1559
Subject 5.1 wish: Change default background color to white or var
Area wish
Queue grass
Requestors neteler@itc.it
Owner none
Status resolved
Last User Contact Fri Jan 31 18:43:28 2003 (6 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Sun Feb 9 15:54:18 2003 (6 yr ago)
Created Fri Jan 31 16:53:15 2003 (6 yr ago)

Transaction History Ticket 1559


Fri, Jan 31 2003 16:53:15    Request created by guest  
Subject: 5.1 wish: Change default background color to white or var

grass binary for platform: Compiled from Sources

Dear developers,

as monitors are much better nowadays than 10-20 years ago (refresh rate),
I would like to propose (GRASS 5.1) to either change default background
color to white or, better, allow for an environmental variable defining
the color.

Such variable exists already:
 GRASS_BACKGROUNDCOLOR
but is currently only used for the PNG driver.

I tried to understand the related XDRIVER code, but don't know where
to add support for GRASS_BACKGROUNDCOLOR.

Maybe we also define GRASS_FOREGROUNDCOLOR for default vector line colors etc.
Regards

 Markus Neteler
Fri, Jan 31 2003 18:43:28    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15930.44632.824059.807427@cerise.nosuchdomain.co.uk>
Date Fri, 31 Jan 2003 17:11:52 +0000
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #1559] (grass) 5.1 wish: Change default background color to white or var
In-Reply-To <20030131155316.1148F13B3C@lists.intevation.de>
References <20030131155316.1148F13B3C@lists.intevation.de>
X-Mailer VM 7.07 under 21.4 (patch 12) "Portable Code" XEmacs Lucid
X-Spam-Status No, hits=-3.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, SIGNATURE_SHORT_DENSE,SPAM_PHRASE_01_02 version=2.43
X-Spam-Level
Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=1559
> -------------------------------------------------------------------------
> 
> Subject: 5.1 wish: Change default background color to white or var
> 
> grass binary for platform: Compiled from Sources
> 
> Dear developers,
> 
> as monitors are much better nowadays than 10-20 years ago (refresh rate),
> I would like to propose (GRASS 5.1) to either change default background
> color to white or, better, allow for an environmental variable defining
> the color.
> 
> Such variable exists already:
>  GRASS_BACKGROUNDCOLOR
> but is currently only used for the PNG driver.
> 
> I tried to understand the related XDRIVER code, but don't know where
> to add support for GRASS_BACKGROUNDCOLOR.
> 
> Maybe we also define GRASS_FOREGROUNDCOLOR for default vector line colors etc.
At the bottom of Graph_Set.c is:

    /* Now create a pixmap that will contain same contents as the
     * window. It will be used to redraw from after expose events */
    bkupmap = XCreatePixmap(dpy, grwin, xwa.width, xwa.height, xwa.depth);
    XSetWindowBackgroundPixmap(dpy, grwin, bkupmap);
    XSetForeground(dpy, gc, BlackPixel(dpy, scrn));
    XFillRectangle(dpy, bkupmap, gc, 0, 0, xwa.width, xwa.height);

    XSetBackground(dpy, gc, BlackPixel(dpy, scrn));
    XSetForeground(dpy, gc, WhitePixel(dpy, scrn));

The first call to XSetForeground() determines the initial background
colour; the second call determines the initial foreground colour. I
suspect that the call to XSetBackground may be irrelevant (the X
background colour is only used for two-colour operations such as
bitmaps, dashed lines, stippled regions etc).

Note that this will set the *initial* colours. There aren't really
"default" background/foreground colours, in the sense that the monitor
protocol doesn't have a "reset" operation. Once any client changes
these settings, they stay changed.

Consequently, most clients will explicitly set the colour themselves
(e.g. "d.erase" will erase to black, "d.vect" will draw white lines). 
If you want persistent defaults, you would need to implement them in
the clients, not the drivers.

-- 
Glynn Clements <glynn.clements@virgin.net>


Sun, Feb 9 2003 15:53:31    Comments added by guest  
Thanks for the hints. It is implemented in 5.1 now.

Markus
Sun, Feb 9 2003 15:54:18    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request