VComputeLine
Name
VComputeLine - computes the coordinates of the points of the line between
two specified points.
Synopsis
VComputeLine(x1, y1, x2, y2, points, npoints)
int x1, y1, x2, y2;
XPoint **points;
int *npoints;
Description
VComputeLine computes the coordinates of points of the line between two
specified points. VComputeLine also allocates memory space for buffer and
returns the (x,y) coordinates of each point along the line to the *points
and the number of points stored in the buffer to npoints. If the first
point is the same as the second point, VComputeLine returns the (x,y)
coordinate of the first point to *points and 1 to npoints. To free the
memory allocated, one can use free().
Return Value
0 - work successfully.
1 - memory allocation failure.
Parameters
x1, y1 - specifies the first point of the line.
x2, y2 - specifies the second point of the line.
points - returns an array of points (x, y) along the line to the XPoint
structure.
npoints - returns the number of the points along the line.
Side Effects
None
Entry Conditions
None
Related Functions
None.