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 ScaleItem (Item: longint; kx, dx, ky, dy: double);

The procedure ScaleItem transforms the position of the graphics element Item according to the following equations:

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

The item is accessed via its index (parameter Item) into the DataContainer array. Normally this index is retrieved by other methods such as FindNearestItemReal. The parameters kx and ky could be set to zero values in order to simply shift the graphics item 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.

Last Update: 2012-Oct-20