ttf rotation is fixed in trunk for agg. the point of rotation is the centre of the symbol.
regards, thomas On Fri, Jan 2, 2009 at 17:29, Fawcett, David <david.fawc...@state.mn.us> wrote: > Donald, > > I have seen this same issue using MapServer 5.2.0. I first noticed it > when I was doing an attribute binding example, but I can confirm that it > also occurs when using a fixed angle. > > When specifying a fixed angle of 0 or 360, the symbol lands correctly on > the point. An angle of 90 sets it off of the point to the left. 180 > puts it to the lower left, 270 is lower center, 359 is almost back on > center. > > The more that I look at this, it really looks like it is This related to > the proper centering of symbols. My square .ttf character appears to be > rotating around the lower left corner of the glyph. When the symbol is > placed unrotated, it is correctly centered on the point feature. So, > maybe the rotation point needs to be calculated the same way as the > placement point. > > I was quickly trying to pull together a demo, so I abandoned the .ttf > approach and used a pixmap symbol of an arrow. > > I think that it is likely a bug, I should have filed a bug report back > then. I will do so now if you aren't interested in doing it. > > David. > > -----Original Message----- > From: mapserver-users-boun...@lists.osgeo.org > [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Donald > Kerr > Sent: Friday, January 02, 2009 9:58 AM > To: mapserver-users@lists.osgeo.org > Subject: [mapserver-users] Rotated TrueType Point Symbols - Issue > > > I have created a number of TrueType symbols most of which are good > enough when positioned on the map at their default centre point. > > There appears to be an issue when these are then rotated using ANGLE. > They do not appear to rotate around their centre point which can make > them look very odd when placed on the map. > > Please see attached images one showing without the ANGLE applied and the > other with. If the symbol rotated around its centre point then the arrow > would simply show pointing the other way (180 degrees). > > I tried to make a TTF symbol that had the head of the arrow in the > centre in the hope that it would rotate on this point. It shows > correctly when no ANGLE is applied i.e. the head of the arrow over the > point on the map but, when rotated, the error in placement is > exaggerated. > > Here are the CLASS and SYMBOL definitions: > > CLASS > NAME "benchMarkSymbol" > EXPRESSION "benchMarkSymbol" > STYLE > SYMBOL "benchMarkSymbol" > SIZE 12 > MAXSIZE 12 > MINSIZE 4 > COLOR 0 0 0 > ANTIALIAS TRUE > ANGLE [orientation] > END # STYLE > END # CLASS > > SYMBOL > NAME 'benchMarkSymbol' > TYPE TRUETYPE > FONT OSMasterMapSymbols > FILLED false > ANTIALIAS true > CHARACTER '7' > END # SYMBOL > > The question is, am I doing something wrong or is this a bug? If the > latter, is there a workaround meantime? For me just now, I'd be happy if > the symbol rotated around its centre - I could live with that as a > workaround. > > In a previous thread that I started about positioning of LABELs, Thomas > Bonfort said, "I'd be in favor of having a way to specify the anchor > point, either by fixing it on 0,0 , or by specifying it alongside the > symbol, eg ANCHORPOINT 0.3 2". I agree that this would be good for > symbols too but it may present a problem with scaled symbols, especially > TTF. If it's not a fixed size then how can an anchor point be specified? > > Many thanks. > > Regards, > > Donald Kerr > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users