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() is called.

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 
be continued by moving the cross hairs to the next point and typing <Ins> again. Typing <Enter> will start a 
new line.

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

  • <Del > erases the last line that you have drawn.
  •  The keys <Alt-1> through <Alt-9> select a line style for the drawing. Entering these keys is equivalent to using the <Enter> key since it marks the spot of the cursor as the place to start the new line style.
  • <Alt-t > allows you to enter a GrafText string up to 20 characters long. The font may be selected using <Alt-f>, its height may be changed with <Alt-h>, and rotation may be changed with <Alt-r>.
  • <Alt-f > selects the GrafText PostScript font to be used. See GTfont() for the correct font numbers to use.
  • <Alt-h> selects the height of the GrafText font in inches. Be sure to specify the height (in inches) as a floating-point number.
  • <Alt-r> selects the rotation of the GrafText font in degrees. Be sure to specify the rotation in degrees as an integer.
  • <Alt-s> allows you to swap the functions of the mouse buttons.

  • <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.
  • <Esc> exits the cursor mode.
The cross hairs have four speeds. You can step through the choices by typing <Alt-y> repeatedly.

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