1vga_drawline(3) Svgalib User Manual vga_drawline(3)
2
3
4
6 vga_drawline - draw a line on the screen
7
9 #include <vga.h>
10
11 int vga_drawline(int x1, int y1, int x2, int y2);
12
13
15 draws a line from (x1, y1) to (x2, y2) on the screen. If you exchange
16 start and end of the line you should not expect the exactly identical
17 set of pixel be covered by the line.
18
19 This function is very inefficient as is does a bunch of vga_draw‐
20 pixel(3) calls, you should consider using gl_line(3) which is very
21 efficient, or doing direct screen access instead or use
22 vga_drawscansegment(3) to handle more than one pixel.
23
24 The color drawn is set with vga_setcolor(3) or vga_setrgbcolor(3) resp.
25
26 The function always returns 0 (on which you should probably not really
27 rely).
28
30 svgalib(7), vgagl(7), libvga.config(5), gl_line(3) vga_clear(3),
31 vga_setcolor(3), vga_setrgbcolor(3), vga_getpixel(3), vga_drawline(3),
32 vga_drawscanline(3), vga_drawscansegment(3), vga_getscansegment(3)
33
35 This manual page was edited by Michael Weller <eowmob@exp-math.uni-
36 essen.de>. The exact source of the referenced function as well as of
37 the original documentation is unknown. This Page was modified by Don
38 Secrest <secrest@uiuc.edu>
39
40 It is very likely that both are at least to some extent are due to Harm
41 Hanemaayer <H.Hanemaayer@inter.nl.net>.
42
43 Occasionally this might be wrong. I hereby asked to be excused by the
44 original author and will happily accept any additions or corrections to
45 this first version of the svgalib manual.
46
47
48
49Svgalib (>= 1.2.11) 21 August 1999 vga_drawline(3)