×
Menu
Index

GraQueryTextBox

 
 
ยท GraQueryTextBox( cText ) => The function GraQueryTextBox() returns a two dimensional array of five elements. Each element contains a subarray with two elements which are the relative coordinates for five points. The first four elements designate the corner points for a parallelogram which represents the boundaries of the specified character string <cString> . The fifth element is the pen position at which the pen is found after the character string is drawn with GraStringAt():
 
 
aPoints := { { nXLeft , nYTop    }, ;            // upper left corner
                  { nXLeft , nYBottom }, ;          // lower left corner
                  { nXRight, nYTop    }, ;           // upper right corner
                  { nXRight, nYBottom }, ;         // lower right corner
                  { nXPen  , nYPen    }  }          // pen position
 
The points designate the boundaries if the string is displayed at the origin of the coordinate system (the point {0,0}). To calculate the actual coordinates for a box surrounding a string, add the x and y positions at which <cString> is drawn.