ALPHACOLOR_ENABLED code in mapfile.c

Simon Kammerer simon.kammerer at WEB.DE
Sun Mar 25 10:26:12 EDT 2007


Looks like I'm currently the only one who needs alpha channel values in 
colors...

The reason why I need alpha values in colorObj:
I'm playing around with SWF output (flash) and I managed to create 
highlighted buttons ( = shapes in layers, change color when mouse over). 
Style- or class-wide opacity values would apply to the whole object, but 
I'd like to define different opacity values for unhighlighted and 
highlighted color of an object.

Anyway, as I'm quite sure that I have to maintain my own patches in the 
near future (mainly because of additional keywords in mapfiles / 
symbolfiles ), I'm not lost if colors with alpha value disappear from 
official code. So I will not argue pro or contra alpha values, 
especially because I'm quite new to mapserver and don't know the needs 
of the masses!

Best regards
Simon




Daniel Morissette schrieb:
> 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.



More information about the mapserver-dev mailing list