1al_draw_soft_line(3) al_draw_soft_line(3)
2
3
4
6 al_draw_soft_line - Allegro 5 API
7
9 #include <allegro5/allegro_primitives.h>
10
11 void al_draw_soft_line(ALLEGRO_VERTEX* v1, ALLEGRO_VERTEX* v2, uintptr_t state,
12 void (*first)(uintptr_t, int, int, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*),
13 void (*step)(uintptr_t, int),
14 void (*draw)(uintptr_t, int, int))
15
17 Draws a line using the software rasterizer and user supplied pixel
18 functions. For help in understanding what these functions do, see the
19 implementation of the various shading routines in addons/primi‐
20 tives/line_soft.c. The line is drawn top to bottom.
21
22 Parameters:
23
24 · v1, v2 - The two vertices of the line
25
26 · state - A pointer to a user supplied struct, this struct will be
27 passed to all the pixel functions
28
29 · first - Called before drawing the first pixel of the line. It is
30 passed the coordinates of this pixel, as well as the two vertices
31 above. The passed vertices may have been altered by clipping.
32
33 · step - Called once per pixel. The second parameter is set to 1 if
34 the step is a minor step, and 0 if this step is a major step. Minor
35 steps are taken only either in x or y directions. Major steps are
36 taken in both directions diagonally. In all cases, the absolute val‐
37 ue of the change in coordinate is at most 1 in either direction.
38
39 · draw - Called once per pixel. The function is expected to draw the
40 pixel at the coordinates passed to it.
41
43 al_draw_line(3)
44
45
46
47Allegro reference manual al_draw_soft_line(3)