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



DoubleArrow


Unit: SDL_rchart
Class: TRChart
Declaration: [1] procedure DoubleArrow (x1,y1, x2,y2: double; HeadSize: integer);
[2] procedure DoubleArrow (x1,y1, x2,y2: integer; HeadSize: integer);
[3] procedure DoubleArrow (x1,y1: integer; x2,y2: double; HeadSize: integer);
[4] procedure DoubleArrow (x1,y1: double; x2,y2: integer; HeadSize: integer);
[5] procedure DoubleArrow (x1: integer; y1: double; x2: integer; y2: double; HeadSize: integer);
[6] procedure DoubleArrow (x1: double; y1: integer; x2: double; y2: integer; HeadSize: integer);

The method DoubleArrow draws a two-headed arrow between the points (x1,y1) and (x2,y2). The arrow can be drawn in different coordinate system modes: version [1] uses the world coordinates (these are the coordinates shown at the axes of the chart), version [2] uses the screen coordinates in pixels, and versions [3] to [6] mix them. Using screen coordinates (which are declared as integer) has the effect that the arrow remains at a fixed position even if the chart is panned or zoomed. Using mixed mode coordinates ([3] and [4]) allows to implement a "stretching" effect, with one end of the arrow staying in place and the other moving with the world coordinate system, versions [5] and [6] allow to fix either the x or the y positions of the arrow.

The parameter HeadSize determines the size of the arrow's head (in pixels!). Please note that a minimum size of 4 is required to draw acceptable arrowheads.

The drawing cursor is set to the position (x2,y2). The coordinates are real coordinates of the chart window. The line width of the arrow may be adjusted by the property LineWidth.

 

Hint: In the Light Edition the number of chart elements is restricted to 1000 elements.



Last Update: 2017-Okt-23