4 * Copyright 1993 Bob Amstadt
10 #include "wine/wingdi16.h"
13 /**********************************************************************
16 BOOL WINAPI LineDDA(INT nXStart, INT nYStart, INT nXEnd, INT nYEnd,
17 LINEDDAPROC callback, LPARAM lParam )
19 INT xadd = 1, yadd = 1;
22 INT dx = nXEnd - nXStart;
23 INT dy = nYEnd - nYStart;
31 if (dx > dy) { /* line is "more horizontal" */
32 err = 2*dy - dx; erradd = 2*dy - 2*dx;
33 for(cnt = 0;cnt <= dx; cnt++) {
34 callback(nXStart,nYStart,lParam);
43 } else { /* line is "more vertical" */
44 err = 2*dx - dy; erradd = 2*dx - 2*dy;
45 for(cnt = 0;cnt <= dy; cnt++) {
46 callback(nXStart,nYStart,lParam);