|void curson (srow, scol, fx, fy, find)||CURSOR.C||Level 3|
|int srow, scol||The location of the digital readout on the screen. The matrix is 8 pixels wide and 10 pixels high. (0, 0) is the top left of the screen.|
|float **fx, **fy||You must dynamically allocate these arrays using gpcalloc() with dimensions of 64 each. They will contain the floating-point values of the points you mark on the curve. The arrays may be reallocated by curson(), so you must pass in pointers to pointers. To obtain inch or pixel values, pass your arrays to usertopix() and pixtoin().|
|int *find||The dimension of the final float arrays (passed back to the calling routine).|
|curson() displays a digital readout on the screen at the location
srow, scol in an 8 ´ 10
pixel font. The cross hair is displayed, and all of the cursor functions
are enabled. The axis drawing routines must be called before curson()
When the program gets to the call to curson(), the cross hairs will appear in the center of the plot area. To the left of the screen will be displayed a readout of the cross hairs' position. The readout will be in user units by default. To change to inch units, type an <Alt-i>. An <Alt-u> will return the readout to user units.
Movement of the cross hairs is controlled by the arrow keys or a supported mouse.
To draw lines, mark a point by typing <Enter>. Move the cross hairs
to the next point and type <Ins>. This line can
The angle brackets indicate a key or combination of keys to be typed on the keyboard. For GraphiC/Win, do not press the Alt key in the following commands
<Enter> puts the x and y values of the cross hairs into the arrays fx and fy, which are in user units or inch (or cm) units. The units stored depend on the units displayed. If you save some points and then change units and save some more points, the arrays will have have mixed units. For example, suppose you save five points in user units, then change to inch (or cm) units and save five more points. The first five elements in the arrays will be in user units, and the last five elements will be in inch (or cm) units. Use usertopix() to convert user units to pixels and intopix() to convert inch units to pixels.
When using a three-button mouse, the left button is the same as <Enter>, the center button is the same as <Ins>, and the right button is the same as <Esc>. With a two-button mouse, the left button is the same as <Enter>, the right button is the same as <Ins>, and both buttons together are the same as <Esc>.