Not knowing if there has been any meaningful development since 6.50 in the area of text objects, I would consider that question as the perfect source of frustration for MB programmers. You are right, the MBR of a text object enclose the "line" if any. I ran a little test that seems to indicate there could be a way to "rebuild" the text rectangle itself.
I made the assumption that the other extremity of the line (the one not on the MB) is the centroid of the text itself. If Xmin (with the line end) < CentroidX(text_object) then Xmini of text object = Xmax - 2 *( Xmax - CentroidX) . Same principle in the Y direction. I have noted two fascinating thing: 1 - the centroidx/y() functions are not affected by the existence of a line and 2 - the Xmax of a text object (with or without a line) may not correspond to the actual right side end of the text rectangle. I have discussed that last point at length (www.paris-pc-gis.com/d_a/da_start.htm) where I have shown that the extremity of a text object is basically irrelevant in most cases and should not be given any credibility MI does not use that information to display the text A last remark, my suggestion should be tested to take into account slanted text objects. Jacques Paris e-mail [EMAIL PROTECTED] MapBasic-MapInfo support http://www.paris-pc-gis.com -----Original Message----- From: Canfield, Andrew [mailto:[EMAIL PROTECTED] Sent: June 20, 2005 17:26 To: [email protected] Subject: MI-L MapBasic Text object question To all who may know, Using Mapbasic how do I get the minimum bounding rectangle for just the text of a text object when it has an arrow pointing to something. Using MBR() or using ( ObjectGeography(Lyr.Obj,1), ObjectGeography(Lyr.Obj,2), ObjectGeography(Lyr.Obj,3), and ObjectGeography(Lyr.Obj,4) to create a rectangle ) both yield the same thing. They give me the MBR for the entire entity including the arrow. I need the MBR of just the text. Does anyone know how I can accomplish this? Thank you, Andy --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 16833 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 16834
