[mapserver-users] Re: Transparent outline

Norman Vine nhv@cape.com
Wed, 31 Jul 2002 17:15:43 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0075_01C238B5.E7C3CC80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

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


------=_NextPart_000_0075_01C238B5.E7C3CC80
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3D"Times New Roman" size=3D2>Sidnei de Souza<SPAN=20
class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff>&nbsp;=20
writes:&nbsp;</FONT></SPAN></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">I=20
  think what is really happening is that MapServer is drawing the =
polygons=20
  always with outline.=20
  <P>If I specify "outlinecolor -1 -1 -1" or don't specify outlinecolor =
at all,=20
  it draws the outline with the same color used to fill the polygon.=20
  <P>We tested the same layer on ArcView and if we ask ArcView to use=20
  outlinecolor =3D fill color, the result is the same as MapServer. If =
we ask=20
  ArcView not to use outline, the result is equal to MapObjects.=20
  <P>Any new ideas on this? Please!&nbsp;<SPAN =
class=3D00130921-31072002><FONT=20
  face=3DArial color=3D#0000ff size=3D2>&nbsp;</FONT></SPAN>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>You=20
  could test your hypothesis by changing the 'C" code in=20
  mapprimitive.c</FONT></SPAN>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff=20
  size=3D2>FROM</FONT></SPAN>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>void=20
  msImageScanline(gdImagePtr im, int x1, int x2, int y, int =
c)<BR>{<BR>&nbsp;=20
  int x;</FONT></SPAN>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>&nbsp;=20
  for(x=3Dx1; x&lt;=3Dx2; x++)<BR>&nbsp;&nbsp;&nbsp; gdImageSetPixel(im, =
x, y,=20
  c);<BR>}</FONT></SPAN></P>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff=20
  size=3D2>TO</FONT></SPAN></P>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>void=20
  msImageScanline(gdImagePtr im, int x1, int x2, int y, int =
c)<BR>{<BR>&nbsp;=20
  int x;</FONT></SPAN></P>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>&nbsp;=20
  for(x=3Dx1+1; x&lt;x2; x++)<BR>&nbsp;&nbsp;&nbsp; gdImageSetPixel(im, =
x, y,=20
  c);<BR>}</FONT></SPAN></P>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>Note I=20
  am not really sure of all of the ramifications </FONT></SPAN><SPAN=20
  class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>of doing this=20
  </FONT></SPAN><SPAN class=3D00130921-31072002><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>but ...</FONT></SPAN></P>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>it=20
  should&nbsp;make&nbsp;a good test and if this gives the results that =
you=20
  want</FONT></SPAN></P>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff =
size=3D2>I will=20
  look further into this :-)</FONT></SPAN></P>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff=20
  size=3D2>Cheers</FONT></SPAN></P>
  <P><SPAN class=3D00130921-31072002><FONT face=3DArial color=3D#0000ff=20
  size=3D2>Norman</FONT></SPAN></P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0075_01C238B5.E7C3CC80--