[Mapserver-users] [PHP/MS 3.7-dev]: setRGB() conflicts with createLegendIcon() ?

Vinko Vrsalovic vinko at cprsig.cl
Fri Feb 21 13:58:34 PST 2003


On Fri, Feb 21, 2003 at 04:15:54PM -0500, Daniel Morissette wrote:
> Vinko Vrsalovic wrote:
> > 
> > When using setRGB, and then createLegendIcon(), the color drawn is not the
> > one I set, but another (apparently random) one. But, if I use
> > map->save() and create a mapObj from the saved one, and draw an image using
> > the saved mapfile, it shows the correct color.
> > 
> 
> FYI I think this must be related to a color handling problem described
> in bugs 276 and 275:
> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=276
> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=275

Yes, that certainly is related to my problem, i applied the solution of
changing this

  if(style->backgroundcolor.pen == MS_PEN_UNSET) msImageSetPenGD(img, &(style->backgroundcolor));

for this
  
  msImageSetPenGD(img, &(style->backgroundcolor));

(Well, all three, obviously, not only the bgcolor)

in all mapgd.c and now it works correctly.

I changed that in all occurrences of SetPen related to style. 

I left the occurrences related to label as is, to test if this fails on labels too. 
I will report on that one soon.


-- 
Vinko Vrsalovic <el[|- at -|]vinko.cl>
http://www.cprsig.cl



More information about the MapServer-users mailing list