Rotate truetype symbols

Roy Braam roybraam at B3PARTNERS.NL
Mon Jul 23 08:16:26 EDT 2007


 

List,    

I’ve got a  question about rotating (with angle/angleitem) a truetype font symbol.        

I’ve  created a layer that shows bridges etc. of roads. I’m using a font that has a ‘bridge-symbol’.  The direction of the nearest road in angles is stored in a attribute of the bridges-data.  It works fine with pixmap symbols. When using truetype font symbols and the  angle is 0 it also works fine. But when the angle is getting bigger the symbol deviates  more from the real point. The symbol is rotated fine. I think this has to do  with the point of rotation of the truetype symbol. In pixmap’s the point of  rotation is the center that’s why it works fine. I’m using a truetype font  symbol because I want the symbols fully transparent. When the pixmap symbol is  rotated it isn’t transparent anymore. I thought this was a good solution….. Can  anyone help? My ‘code’ in the mapfile: 
                                                                                                                                                        

LAYER
            ….
            TYPE POINT
            TRANSPARENCY alpha
            CLASS
                        NAME "bridge"
                        STYLE
                                   #Used in  older versions: ANGLEITEM “nearest_road_direction”      
                                   ANGLE [nearest_road_direction]
                                   COLOR 0 255 0
                                   SYMBOL "bridge"
                                   SIZE 10
                        END
                        STYLE
                                   COLOR 255 0 0
                                   SYMBOL  "point1"
                                   SIZE 10
                        END
            END
END
SYMBOL
            NAME "bridge"
            TYPE TRUETYPE
            FONT symbolfont
            FILLED TRUE
            CHARACTER "D"
            ANTIALIAS TRUE
END
SYMBOL
            NAME "point1"
            TYPE ellipse
            points
                        1 1
            end
            FILLED true
END
 
So when the  angle is bigger then 0 the symbol ‘point1’ and the center of the symbol ‘bridge’  is not shown on the same point. When angle equals 0 it is.The 'only' thing i want to do is rotate fully transparent symbols...        

Tia,    Roy Braam
B3partners BV
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070723/3f3afaa2/attachment.html


More information about the mapserver-users mailing list