Solution |
There are two functions (R2M and M2R) which relate the layer coordinate system to the screen coordinate system and vice versa. These two functions can be used to convert between the coordinate systems of different layers. The following example shows how to convert between the coordinate systems of layer 2 and layer 3:
const
LAYER_A = 2;
LAYER_B = 3;
var
aux_x, aux_y : integer;
lax, lay : double;
lbx, lby : double;
....
RChart1.R2M (LAYER_A, lax, lay, aux_x, aux_y);
RChart1.M2R (LAYER_B, aux_x, aux_y, lbx, lby);
....
|