Fuzzy brushes...

Steve Lime steve.lime at DNR.STATE.MN.US
Thu Dec 15 12:05:06 EST 2005


Thanks for the feedback. Yes, with last nights modifications the polygon outlines work
too. You can also define simple symbols for applying patterns:

SYMBOL
  NAME 'dashed'
  TYPE SIMPLE
  STYLE 20 20 END
END

and those can use the new brushes. I still need hook into the ELLIPSE brushes though.

As for new parameters, yes I could see some being added for fine tuning brush creation: hardness,
shape (circle, square, diamond) and so on. At this point I thought it better not to add new 
keywords and just get the basics working. 

I'm really curious about the performance hit...

Steve

>>> Yewondwossen Assefa <assefa at DMSOLUTIONS.CA> 12/15/05 10:27 AM >>>
Steve,

 I just tried the antialias on lines and It seems to work well. There 
are a couple of quetions that were raised here reagrding this :
  * would paremeters like hardness be available at some point for setting ?

I did not yer try it with polygone outlines but I am assuming that It 
should work too. Is that correct ?

I will continue the testing in the next days with diffrent features and 
report regularly. That for the addition.

Later,

Steve Lime wrote:

>In case anyone would like to test I have hooked up the fuzzy brush generator in mapgd.c for the most trivial line drawing case (no symbol defined). To use:
>
>1) define a 24-bit output format, IMAGETYPE 'png24' works nicely
>2) define a simple style definition for a line layer (or polygon outline) like so:
>
>  STYLE
>    WIDTH 3
>    COLOR 255 0 0
>    ANTIALIAS TRUE
>  END
>
>3) set TRANSPARENCY ALPHA to enable alpha blending
>
>Caveats:
>
> - brushes need to be odd sized. That requirement is enforced in the brush builder which detects even sized requests and rounds up. Symbol scaling should work just fine.
>
> - you'll notice that the line "fades" in at the start which is due to the  transparent nature of the brush. Adjusting the default "hardness" may minimize that.
>
>That should do it. I will enable for circles layers and other instances  where it makes sense (circle symbols, simple symbols with dash patterns and so on) ASAP. I also will enable image cache use in the most simple case which may help performance a bit.
>
>Note, I hope to do away with 3) (there is a bug filed) but can't yet because of a problem in the image merging code in mapgd.c (not mine old code for a change).
>
>Steve    
>  
>


-- 
----------------------------------------------------------------
Assefa Yewondwossen           
Software Analyst   

Email: assefa at dmsolutions.ca    
http://www.dmsolutions.ca/ 

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-dev mailing list