Re: [OpenMap Users] DayNightLayer

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 31 Mar 2006 14:03:11 -0500

Hi Chase,

Thanks for the heads-up. I've had the daytime color set in my
properties file for so long, I never saw that effect.

- Don

On Mar 30, 2006, at 5:05 PM, Chase Barrett wrote:

> All,
>
>
>
> The comments for the daytimeColor field in DayNightLayer indicate
> that the intended color is a fully transparent white:
>
>
>
> /** The color of daytime - default is white and clear. */
>
> protected Color daytimeColor = new Color(0x00FFFFFF);
>
>
>
> However, the constructor chosen for this field ensures a fully
> opaque white (at least in Java 1.4.2 and above) :
>
>
>
> /**
>
> * Creates an opaque sRGB color with the specified combined RGB
> value
>
> * consisting of the red component in bits 16-23, the green
> component
>
> * in bits 8-15, and the blue component in bits 0-7. The
> actual color
>
> * used in rendering depends on finding the best match given the
>
> * color space available for a particular output device. Alpha is
>
> * defaulted to 255.
>
> *
>
> * _at_param rgb the combined RGB components
>
> * _at_see java.awt.image.ColorModel#getRGBdefault
>
> * _at_see #getRed
>
> * _at_see #getGreen
>
> * _at_see #getBlue
>
> * _at_see #getRGB
>
> */
>
> public Color(int rgb) {
>
> value = 0xff000000 | rgb;
>
> }
>
>
>
> If you use the Color(int rgba, boolean hasalpha) constructor for
> daytimeColor and nighttimeColor, it will preserve the alpha
> components you are passing in.
>
>
>
> Best Regards!
>
>
>
> Chase Barrett
>
> Intelligent Software Solutions
>
>
>
>

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Mar 31 2006 - 14:03:47 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT