Hello all.
 
I am (too !) trying to read the size of text objects in a MapInfo mapper window with difficulties.
 
Following Bill Thoen's approach here's what I am doing:

First I callObjectGeography () to retrieve the minimum bounding
rectangle (MBR) of the text object.
I then take the vertical distance between the min-Y and max-Y using the distance () function in
inches, and divide by the map scale found in MapperInfo
(FrontWindow(), MAPPER_INFO_SCALE) (after setting distance units to
inches).
I get some sort of approximate text size in inches which I then multiply by 72 to get points.
Actually, this is not working two badly, since I am more looking for consistency over exact sizes.
 
As expected, trouble begins when you try reading text with an Angle<>0.
Has anyone come-up with a method that would give an approximation of the text size provided you have the MBR and angle (and text string lenght if needed) ? I have tryed quickly with Trig functions but could not figure it out.
 
Thanks in advance for anybody helping chasing that goose !
I will sum.
 
Dany Bouchard
DBx Geomatics
38 de l'Orbite
Hull, Qu�bec
Canada
J9A 3C7
T�l�phone/Telephone: 819.743.3870
T�l�copieur/Fax: 819.775.3264
Courrier �lectronique/Email: [EMAIL PROTECTED]
Page Web/Web site: http://www.dbxgeomatics.com/home.asp
Vitrine technologique SVG / SVG Technology Preview: http://www.dbxgeomatics.com/svg.asp

Reply via email to