Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
al_draw_soft_line(3)					  al_draw_soft_line(3)

NAME
       al_draw_soft_line - Allegro 5 API

SYNOPSIS
	      #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))

DESCRIPTION
       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/primi-
       tives/line_soft.c.  The line is drawn top to bottom.

       Parameters:

       o v1, v2	- The two vertices of the line

       o state - A pointer to a	user supplied  struct,	this  struct  will  be
	 passed	to all the pixel functions

       o 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.

       o 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.

       o draw  -  Called once per pixel.  The function is expected to draw the
	 pixel at the coordinates passed to it.

Allegro	reference manual				  al_draw_soft_line(3)

NAME | SYNOPSIS | DESCRIPTION

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=al_draw_soft_line&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help