Thomas,<div><br></div><div>IMHO, the current approach (requiring to use hex colors when using alpha values) seems to be a reasonable solution, if we implement the same when writing color values to the mapfile (in writeColor).</div>
<div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br></div><div><br><br><div class="gmail_quote">2012/9/23 thomas bonfort <span dir="ltr"><<a href="mailto:thomas.bonfort@gmail.com" target="_blank">thomas.bonfort@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Tamas,<br>
The handling of alphas in colors is a bit flakey, I agree. The initial<br>
aim when we worked on this at the montreal code sprint was to drop<br>
support of the OPACITY keyword at the STYLE level in the mapserver<br>
library (while maintaining it in the parser for backwards<br>
compatibility), by allowing colors to be specified with quadruplets<br>
instead of triplets. I don't rememember the reason (Steve might<br>
recollect), but in the end having the parser be able to parse both<br>
triplet and quadruplet integers was not possible, and we are thus<br>
stuck in this less than ideal state.<br>
If someone has a solution for this parser problem that would be great,<br>
as it would open up varying opacity for all *COLOR entries.<br>
<br>
regards,<br>
thomas<br>
<div><div class="h5"><br>
On Sun, Sep 23, 2012 at 11:38 AM, Tamas Szekeres <<a href="mailto:szekerest@gmail.com">szekerest@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I don't properly understand how we intend to handle alpha values of colors<br>
> in mapserver. Currently the alpha values can be specified in mapfiles (by<br>
> using the hexadecimal format), but that values are not written back to the<br>
> file in msSaveMap.<br>
> Style level opacity seems to override alpha values specified in mapfiles,<br>
> but on the other hand we cannot specify opacity at some places (like in<br>
> label text colors).<br>
> By using the opacity values of styles seems to change the alpha values of<br>
> multiple properties (color, outlinecolor, background color etc.) which<br>
> doesn't seems to be as such generic as specifying the alpha values for the<br>
> colors individually.<br>
><br>
> I can also see the conditional compilation flag ALPHACOLOR_ENABLED in the<br>
> code, but it doesn't have much effect for the operation.<br>
><br>
> Could someone explain how the things are expected to work?<br>
><br>
> Best regards,<br>
><br>
> Tamas<br>
><br>
</div></div>> _______________________________________________<br>
> mapserver-dev mailing list<br>
> <a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>
><br>
</blockquote></div><br></div>