The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



M2R


Unit: SDL_rchart
Class: TRChart
Declaration: procedure M2R (Layer: integer; xin,yin: longint; var xout,yout: double);

The routine M2R allows the transformation of integer screen (pixel) coordinates into the real-world coordinates of the chart layer specified by the parameter Layer. The parameters xin and yin specify the pixel coordinates of the chart window (not the data area) - therefore the properties MarginLeft and MarginTop should be taken into account when using M2R. The variable parameters xout and yout return the real-world coordinates of the point [xin, yin].

Hint 1: Normally, the user will not utilize this method at all. M2R has been declared public in order to give direct access to the chart area for special purposes.

Hint 2: Please note that the number of layers is restricted to two in the Light Edition of the SDL Suite.

Example: This method is used in the following example programs (see http://www.lohninger.com/examples.html for downloading the code): curvefit, geodata, rchdrag, rctextlabel



Last Update: 2023-Dec-13