Bypass navigation menu
RGB Classic Games
Keeping the classics alive
Currently hosting 566 great games!
Return to Chapter 2

LineRel(XRel, YRel)

Draws a line a relative distance from the current X, Y position using the current drawing color.

You can give this function both positive and negative values.

Parameters

XRel - Number points to draw line in a horizontal direction
YRel - Number points to draw line in a vertical direction

Examples

BASIC

CALL LineRel(10, 10)

PASCAL

LineRel(10, 10);

BGI equivalent

void linerel(int dx, int dy);