Fuzzy brushes (was "Ready for 4.8.0-rc1?")

Steve Lime steve.lime at DNR.STATE.MN.US
Tue Jan 3 14:59:00 EST 2006


It's a bit convoluted to be sure, but that lies more in the history of MapServer than anything else. In
general:

  - SIZE refers to the maximum dimension of a tile or brush (image or vector)
  - WIDTH refers to the thickness of simple lines

Both are necessary (and used differently) for things like hatching symbols where SIZE controls the
spacing of the hatching and WIDTH controls the thickness of the lines used in the hatching.

Anyway for line/circle drawing, aa works with:

  - No symbol defined or TYPE SIMPLE, ANTIALIAS TRUE, and, optionally, WIDTH (default width is 1)
  - circle symbol defined, ANTIALIAS TRUE, and, optionally, SIZE

In both cases you can apply a dash pattern to the symbol definition (if there is one). The code will
use either fuzzy brushes or GD aa single pixel-width lines depending on SIZE/WIDTH values.

For points, vector and truetype symbols can be antialiased.

Steve

>>> Stephen Woodbridge <woodbri at SWOODBRIDGE.COM> 01/03/06 10:47 AM >>>
Sean Gillies wrote:
> Steve,
> 
> I just checked again with one of my mapfiles. I have a graticule  
> shapefile as a line type layer, ANTIALIASING TRUE and symbol 0 in the  
> style, but no sign of antialiasing happening. Is there more to it  than 
> that?

Sean, Try removing the symbol 0

Steve, what is the interaction of antialiasing with symbols? Does size 
now work without symbol if AA is true?

-Steve W.

> Sean
> 
> On Jan 3, 2006, at 8:21 AM, Steve Lime wrote:
> 
>> Try it now. I had a small problem with the trivial (1 pixel wide)  
>> case and =
>> antialiasing. My test cases run fine now. This should be enough to  get =
>> single pixel aa lines:
>>
>> STYLE
>>   COLOR r g b
>>   ANTIALIAS TRUE
>> END
>>
>> Steve
>>
>>>>> Sean Gillies <sgillies at FRII.COM> 01/02/06 11:35 PM >>>
>>
>> Steve,
>>
>> What about 1-pixel wide antialiases lines? I was trying that out  last 
>> =20
>> night, but didn't see any effect. Do we have to have width > 2 to  get 
>> =20
>> antialiasing?
>>
>> Sean
>>
>> On Jan 2, 2006, at 9:16 PM, Steve Lime wrote:
>>
>>> Paul (et al.): I've played around with these a ton recently. I did  =20
>>> change =3D
>>> the brush creation algorithm to more closely approximate Photoshop  =20
>>> or Gimp =3D
>>> and the brushes look quite nice. The stair steps still persist at =20
>>> some =3D
>>> angles. I'm convinced it is a problem in GD. Brushes w/alpha =20
>>> transparency =3D
>>> seem to suffer from aggregation effects of repeated alpha  blending. =20
>>> For =3D
>>> example, you can create a  circular brush with alpha=3D3D64 (50% =20
>>> transparent)=3D
>>>  and if you draw with it the resulting line is *much* darker than =20
>>> you =3D
>>> would expect. This has an unfuzzing effect. As as result the =20
>>> "jaggies" you =3D
>>> see in unantialiased lines persist. Off to poke around in GD now.
>>>
>>> A work in progress...
>>>
>>> Steve
>>>
>>>>>> Paul Spencer <pspencer at DMSOLUTIONS.CA> 12/22/05 6:54 AM >>>
>>>
>>> Steve,
>>>
>>> I have a question about fuzzy brushes.  Your test case looks  really =20
>>> =3D20
>>> good.  We tried this on our tiger map file in ka-Map and the =20
>>> results =3D20
>>> are less impressive.  It seems to work well for lines that are =20
>>> close =3D20
>>> to 45 degrees, but for lines that are closer to the vertical or =3D20
>>> horizontal, there is still a noticeable stairstep effect.  Did you  
>>> =3D20
>>> try other angles on the line?  From what you said, my  understanding =20
>>> =3D20
>>> is that this could be affected by the default hardness that you =20
>>> have =3D20
>>> chosen?
>>>
>>> Cheers
>>>
>>> Paul
>>>
>>> On 22-Dec-05, at 12:08 AM, Daniel Morissette wrote:
>>>
>>>> Our planned date for 4.8.0rc1 is today (Thursday Dec 22nd). Are  we =20
>>>> =3D20
>>>> good to go? Did you still have work to do on the fuzzy brushes  Steve?
>>>>
>>>> Daniel
>>>> --=3D20
>>>> ------------------------------------------------------------
>>>>  Daniel Morissette               dmorissette at dmsolutions.ca 
>>>>  DM Solutions Group              http://www.dmsolutions.ca/ 
>>>> ------------------------------------------------------------
>>>>
>>>
>>> +-----------------------------------------------------------------+
>>> |Paul Spencer                           pspencer at dmsolutions.ca   |
>>> +-----------------------------------------------------------------+
>>> |Applications & Software Development                              |
>>> |DM Solutions Group Inc                 http://www.dmsolutions.ca/| 
>>> +-----------------------------------------------------------------+
>>
>>
>> ---
>> Sean Gillies
>> sgillies at frii dot com
>> http://zcologia.com/news 
> 
> 



More information about the mapserver-dev mailing list