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