[mapserver-users] Re: Transparent outline

Norman Vine nhv at cape.com
Thu Aug 1 10:01:46 EDT 2002


Sidnei de Souza  writes:
>
>YES! It worked! Thanks a lot! It seems that the outline color now works as
expected.
>Just to let you know that this will mean a very important improvement in
our system!

glad to have helped :-)

FYI
The code change I suggested only considers the poly border in the X
direction
and needs to also not draw the border in Y direction.

But this requires bit more more thought to implement

Note that there is a also a performance hit to get the original polygon fill
result
in that one will have to call both the fill and the outline routines to get
the same
thing as before.

I guess this means mapserver should probably have a two polygon fill
routines.

One which fills to the border extremities and one which only fills the
interior
but this would be a 'significant' change in and should be discussed

However hopefully my 'hack' will suit your purposes well enough for now but
...
be advised that all of your other 'filled symbols' will probably be shrunk
also

Cheers

Norman

>>Norman Vine wrote:

>> Sidnei de Souza  writes:
>>>I think what is really happening is that MapServer is drawing the
polygons always with outline.
>>>If I specify "outlinecolor -1 -1 -1" or don't specify outlinecolor at
all, it draws the outline with the same color used to fill the polygon.

>>>We tested the same layer on ArcView and if we ask ArcView to use
outlinecolor = fill color, the result is the same as MapServer. If we ask
>>>ArcView not to use outline, the result is equal to MapObjects.

>>>Any new ideas on this? Please!

>>You could test your hypothesis by changing the 'C" code in mapprimitive.c

>>FROM

void msImageScanline(gdImagePtr im, int x1, int x2, int y, int c)
{
  int x;

  for(x=x1; x<=x2; x++)
    gdImageSetPixel(im, x, y, c);
}

>>TO

void msImageScanline(gdImagePtr im, int x1, int x2, int y, int c)
{
  int x;

  for(x=x1+1; x<x2; x++)
    gdImageSetPixel(im, x, y, c);
}

>>Note I am not really sure of all of the ramifications of doing this but
...
>>it should make a good test and if this gives the results that you want
>>I will look further into this :-)

>>Cheers

>>Norman





More information about the mapserver-users mailing list