[GRASS-dev] Re: not quite there on fonts

Michael Barton michael.barton at asu.edu
Sun May 13 16:24:49 EDT 2007


So I read this to say that, as currently implemented, there is no way to
change the background color of a histogram. Correct?

Michael


On 5/13/07 9:53 AM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Michael Barton wrote:
> 
>> I'll play around with these. But maybe one of you can check to see if
>> d.histogram will actually accept some kind of background color change or if
>> it is hardcoded to white--so I don't waste a lot of time messing with this
>> in situation where it won't work.
> 
> d.histogram calls:
> 
> D_setup(1); /* 1 = clear frame */
> 
> This clears the frame by filling a rectangle thus:
> 
> R_standard_color(D_translate_color(DEFAULT_BG_COLOR));
> R_box_abs (l, t, r, b);
> 
> There isn't any way to erase a portion of the screen to transparent.
> You can erase the entire screen with R_erase(); for the PNG driver,
> this will erase to transparent if GRASS_TRANSPARENT is TRUE.
> 
> Even if R_erase() was changed to erase the clip rectangle (i.e. the
> current frame), another problem is that the display library erases
> using the current erase colour (which is set by d.erase), and there is
> no way to refer to "transparent" as a colour.
> 
> Using R_erase() will ignore the erase colour, which will do the wrong
> thing if you have erased the screen to a non-default colour using
> d.erase.
> 
> Regarding d.histogram, it could just use D_setup(0) to avoid erasing
> the frame. I'm guessing that (unlike most modules) it automatically
> erases because the output isn't georeferenced, so there would be no
> reason to overlay it on top of what is already displayed.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list