Method XbpPresSpace():mapPoint() Foundation
Maps a point from page to device space or vice versa.
:mapPoint( <aPoint>, ; [<lMapToDevice>] ) --> <aPoint>
The method returns a two-dimensional array with the converted coordinate. If .T. is passed in <lMapToDevice>, both elements of the array are specified in device units. If <lMapToDevice> contains .F., :mapPoint() returns the point in page units.
The method :mapPoint() can be used to convert points between device units (pixels) and the units defined in page space. The coordinate system to be used in the abstract page is defined by the application when the method :create() is called. If the whole output rectangle of the device associated with the PS is to be filled using the GraBox() primitive, for example, method :mapPoint() can be used to determine the end point for the operation, notwithstanding the units selected for the PS.
:mapPoint() respects the current page-to-device transform as well as a transform matrix set using :setGraTransform(). If <lbMapToDevice> is .T., both transforms are applied to the point specified and return is the resulting coordinate in device units (pixel). If <lMapToDevice> is .F., both the inverse of the page-to-device transform and the transform matrix, if set, are applied to <aPoint>. Return is the coordinate in page units that selects the pixel originally specified in <aPoint>.
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.