Trouble Areas
Jacques Paris, May 9, 2003
1 - MBR is not representative of real text size |
Rectangle returned by the MBR() function is larger than the one built with the OBJ_INFO_MINX, OBJ_INFO_MINY, OBJ_INFO_MAXX and OBJ_INFO_MAXY obtained from OBJECTINFO().
The anchor point is not even on the MBR right side
|
|
2 - The X2 coordinate entered in the CREAT TEXT command is stored in MI as XMAX |
The XMAX thus registered is different most of the time from that set by the CreateText() function.
Bad adjustment of the text box to the the string actual length result in "bad" behaviour of the text object visible mainly when selected.
It may also create problems when searching for objects at specific coordinates or wih a search object (search by radius,...)
There is no way to detect directly if the XMAX value is appropriate.
|
|
3 - Multi-line text is not properly "justified" when "center" or "right" |
The text does not seem to use the XMAX value to right-justify the lines on (some padding is added between the right of the text and XMAX), or the middle of XMIN, XMAX (the text is shifted to the left)
|
|
4 - Once a text object has been crated with an angle, or an angle is added to it, the XMIN, YMIN... values correspond to the rectangle in which the angled text is inscribed. |
The (X1,Y1) and (X2,Y2) coordinates used in "Create Text", or the (X1,Y1) for the CreatText() are converted into the XMIN,YMIN... of the text bounding rectangle as soon as an angle is specified.
The original text height "implied" by the YMIN,YMAX values is lost and some fancy trigonometric code is required to calculate the text height with a 0 angle. The only constant is XMIN = X1
|
|
5 - It is not possible to know programmatically what is the point size of a given text in a mapper window |
When used on a text object attached to a table, the font used for the object obtained by OBJECTINFO(obj,OBJ_INFO_TEXTFONT) will show a point size of 0. If the same text is queried with the Object Info Tool, it will show the actual point size of the selected text size that takes into consideration the scale of the mapper.
|
|
6 - The font shown in the font style requester cannot be immediately changed programatically as it can be done with the other styles. |
If "set style font font_expression" is executed, the currentfont() function returns the font specified in font_expression but the font displayed in the font style requester in not changed.
If the same procedure was applied e.g. to a PEN, the pen style in the requester will be changed. |