GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
bres_line.c File Reference
#include <grass/gis.h>
Include dependency graph for bres_line.c:

Go to the source code of this file.

Functions

int G_bresenham_line (int x0, int y0, int x1, int y1, int(*point)(int, int))
 Bresenham line algorithm. More...
 

Function Documentation

int G_bresenham_line ( int  x0,
int  y0,
int  x1,
int  y1,
int(*)(int, int point 
)

Bresenham line algorithm.

Draws a line from x1,y1 to x2,y2 using Bresenham's algorithm. A routine to plot points must be provided, as is defined as: point(x, y) plot a point at x,y.

This routine does not require a previous call to G_setup_plot() to function correctly, and is independent of all following routines.

Parameters
[in]x0
[in]y0
[in]x1
[in]y1
[in]pointpointer to point plotting function
Returns
always returns 0

Definition at line 38 of file bres_line.c.

References point.