Method XbpCrt():mapPoint() Foundation

Map a point from one coordinate space to another

:mapPoint( <oXbpDest>, <aPos> ) --> aPosMapped
<oXbpDest> contains the Xbase Part that defines the coordinate space the point is mapped to. The object passed in this parameter must be derived from either the class XbpWindow or XbpCrt.
<aPos> is an array containing the x and y coordinates of the point to be mapped to another coordinate space.

The method returns an array with two elements. It contains the x and y coordinates of the point specified relative to the coordinate system defined by <oXbpDest>.


Method :mapPoint() maps a point from the coordinate space of the XbpCrt window to that of another Xbase Part. Mapping points becomes necessary when a certain coordinate is used with an Xbase Part that is located on another level in the parent/child hierarchy. For example, the function GetPointerPos() returns the mouse pointer position in screen coordinates (see function AppDesktop()). To move a child object of the XbpCrt window to the position of the mouse pointer, the position must first be mapped to the XbpCrt window.. To this, :mapPoint() can be used.


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.