Lightweight Graphics

GLine

Draw a line in pixels

Syntax

Signature
void GLine( int top, int left, int bottom, int right, int color );

Arguments

top, left give the starting pixel, vertical coordinate first.

bottom, right give the ending pixel in the same order.

color is the RGB color returned by GMakeColor().

Return value

No return value.

Description

Draws a line between the two supplied points. Either point can come first. The current clip limits which pixels the line can change.

Example

gline.c
#include "xdev-wtui.h"

int main( void )
{
   GLine( 20, 20, 150, 300, GMakeColor( 0, 128, 255 ) );

   Inkey( 0, NIL );

   return 0;
}

See also