| cmd_linehorz | Function (ROM Call 0x359)

AMS 1.01 or higher | bascmd.h

void cmd_linehorz (CESI y, CESI drawmode);

Executes TI-Basic 'LineHorz' command.

cmd_linehorz displays the Graph Screen and draws, erases, or inverts a horizontal line on it. The parameters y and drawmode should point to two items on the expression stack, which represent respectively the y coordinate of the line and the drawing mode. The y coordinate is an integer or floating point value which is relative to the current window settings (you can change them using the "Window Editor" application, or directly by storing values in system variables "xmin" etc., using the VarStore function). The parameter drawmode should point to one of the following values:

1 | Draws the line.
0 | Erases the line.
-1 | Inverts pixels along the line.

See also cmd_pxlhorz, which uses pixel coordinates instead of window-relative ones, and DrawLine (or DrawClipLine) for much faster low-level line drawing (independently of the Graph Screen).

Uses: GetValue, gr_active, ForceFloat, GraphActivate, YCvtFtoP, MakeWinRect, WinAttr, WinLine

See also: cmd_pxlhorz, DrawLine, DrawClipLine, cmd_linevert, cmd_line