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....



R2M


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

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

Hint 1: Normally, the user will not utilize this method at all. R2M 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): chartpolygons, geodata, rctextlabel, userspec



Last Update: 2023-Dec-13