ALPHACOLOR_ENABLED code in mapfile.c

Steve Lime Steve.Lime at DNR.STATE.MN.US
Mon Mar 26 16:44:39 EDT 2007


Seems like spec's like SLD use RGB colors exclusively with a separate opacity value. I 
think that's the way to affect alpha blending:

STYLE
  COLOR 255 0 0
  OPACITY 50
END

My 2 cents anyway...

Steve

>>> On 3/23/2007 at 7:11 PM, in message
<0C0A3B52-1B82-4C8C-B5AC-94EE4D0CDB4A at dmsolutions.ca>, Paul Spencer
<pspencer at DMSOLUTIONS.CA> wrote:
> Would there be any benefit for the AGG work?  I can't think of any  
> reason, just asking :)
> 
> Paul
> 
> On 23-Mar-07, at 4:05 PM, Daniel Morissette wrote:
> 
>> We've been reminded in bug 2052 (http://mapserver.gis.umn.edu/bugs/ 
>> show_bug.cgi?id=2052) that there is some unused code in mapfile.c  
>> and a few other files dating from 2003 to add ALPHA to the  
>> ColorObj. This code is all inside #ifdef ALPHACOLOR_ENABLED but  
>> there is no documentation for this or any way to use this code  
>> without manually adding the flag to the makefiles (i.e. no  
>> configure options, etc.).
>>
>> Steve's suggestion in the bug, which I agree with is:
>>
>>> I haven't had any plans (or heard a good reason) to use alpha  
>>> channel values in colors. Rather I would support a style-level or  
>>> label-level opacity value that would serve that function and  
>>> impact all colors associated with an object. Doing so would  
>>> mitigate configuration confusion, would not require a change to  
>>> the colorObj (and all supporting code), and would keep  
>>> configuration in the mapfile straight forward.
>>> Unless other complelling reasons exist (and they might) I would  
>>> just as soon remove all references to ALPHACOLOR_ENABLED...
>>
>>
>> I'm sending this email to find out if anyone sees a need to  
>> maintain, complete and document this code to handle ALPHA in the  
>> ColorObj. If not then we'll remove the code and add style-level or  
>> label-level opacity to the TODO list as suggested by Steve.
>>
>> Daniel
>>
>> P.S. Please reply to mapserver-dev and not via the bug report. This  
>> question is off-topic for the bug which was just about a compile  
>> error and turned into a longer debate about the usefulness of this  
>> code.
>> -- 
>> Daniel Morissette
>> http://www.mapgears.com/ 
> 
> +-----------------------------------------------------------------+
> |Paul Spencer                          pspencer at dmsolutions.ca    |
> +-----------------------------------------------------------------+
> |Chief Technology Officer                                         |
> |DM Solutions Group Inc                http://www.dmsolutions.ca/ |
> +-----------------------------------------------------------------+



More information about the mapserver-dev mailing list