HomeManualTopicsTypesSymbols
std_types::screen/std::plot_line
plots a line consisting of half character blocks
Parameters
- screen
- the screen or terminal onto which to plot
- x1
- the x-coordinate of the start point
- y1
- the y-coordinate of the start point
- x2
- the x-coordinate of the end point
- y2
- the y-coordinate of the end point
Results
None
Description
Draws a line from the specified start coordinate (x1/y1) to the specified end coordinate (x2/y2).
Attention: The y-coordinates are measured in half lines.
Example
get_terminal_size! STDIN_FILENO $terminal_width $terminal_height (
create_terminal $terminal terminal_width terminal_height
plot_line &terminal 5 5 70 30
plot_line &terminal 70 30 45 40
plot_line &terminal 45 40 5 5
update_terminal! &terminal $output
print! output
Topic
Terminal
Implements
See also