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


Declaration:procedure ScaleAllItems (kx, dx, ky, dy: double);

The procedure ScaleAllItems transforms the positions of all available items according to the following equations:

newx := oldx * kx + dx
newy := oldy * ky + dy

The parameters kx and ky could be set to zero values in order to simply shift the graphics items on the chart.

Hint: This type of transformation should not be mixed up with range-scaling of the axes (i.e. zooming and panning). Scaling the item positions means changing their positions in the real-world coordinate system. In contrast to this, the alteration of the range of the axes (by using e.g. SetRange) changes the coordinate system but not the positions of the items.

Example: This method is used in the following example program (see for downloading the code): rchfifo

Last Update: 2012-Oct-20