Function GraSegFind() Foundation
Identifies graphic segment based on a given point in the coordinate system.
GraSegFind( [<oPS>], <aPoint> ) --> aSegmentIDs
The return value of GraSegFind() is an array containing the numeric codes (segment IDs) for all graphic segments which encompass the point <aPoint>. If no such segment exists, an empty array is returned. The segment IDs are listed in the array according to the priority of the segments. The segment ID of the segment with the highest priority is the first array element, and remaining segments are ordered by decreasing priority. The priority is analogous to a z axis in a three dimensional coordinate system.
Graphic segments are searched by specifying a point. When the coordinates of <aPoint> lie within a segment, the function GraSegFind() includes the numeric segment ID in the return array of all segments encompassing the indicated point<aPoint>.
This function is also used to identify or to find a graphic segment based on the position of the mouse pointer. Be aware that segments are able to overlap each other so that a given point may be in several segments. In such a case it is not clearly determined in which segment the mouse pointer is located.
The position of the mouse pointer is established by the function AppEvent(). The coordinates for the mouse pointer are found in the first message parameter. For an XbpCrt window, only the text mode row and column coordinates {nRow, nCol} are included. For the message parameters to return graphic coordinates {nX, nY}, the mode for the mouse coordinates must be switched for an XbpCrt window:
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.