LineDDA

  BOOL LineDDA(X1, Y1, X2, Y2, lpLineFunc, lpData)    
  int X1; /* x-coordinate of line's starting point */
  int Y1; /* y-coordinate of line's starting point */
  int X2; /* x-coordinate of line's ending point */
  int Y2; /* y-coordinate of line's ending point */
  PROC lpLineFunc; /* address of application-supplied callback */
  LPVOID lpData; /* address of application-supplied data */

The LineDDA function determines which pixels should be highlighted for a line that is defined by the given starting and ending points.

Parameters

X1

Specifies the x-coordinate of the line's starting point.

Y1

Specifies the y-coordinate of the line's starting point.

X2

Specifies the x-coordinate of the line's ending point.

Y2

Specifies the y-coordinate of the line's ending point.

lpLineFunc

Is the address of an application supplied callback function. For more information about the callback function, see the description of the LineDDAProc callback function.

lpData

Points to the application-supplied data.

Return Value

The return value is TRUE if the function is successful. Otherwise, it is FALSE.

Comments

This function passes the coordinates for each point along the line (except for the line's endpoint) to the application supplied callback function. In addition to the coordinates of a point, this function will pass any application-supplied data (if that data exists).

The coordinates which are passed to the callback function will only match pixels on a video display if the default transformations and mapping modes are used.

See Also

LineDDAProc