4 * Copyright 1993 Bob Amstadt
9 #include "wine/wingdi16.h"
11 /**********************************************************************
14 void WINAPI LineDDA16( INT16 nXStart, INT16 nYStart, INT16 nXEnd, INT16 nYEnd,
15 LINEDDAPROC16 callback, LPARAM lParam )
17 LineDDA( nXStart, nYStart, nXEnd, nYEnd,
18 (LINEDDAPROC)callback, lParam );
22 /**********************************************************************
23 * LineDDA32 (GDI32.248)
25 BOOL WINAPI LineDDA(INT nXStart, INT nYStart, INT nXEnd, INT nYEnd,
26 LINEDDAPROC callback, LPARAM lParam )
28 INT xadd = 1, yadd = 1;
31 INT dx = nXEnd - nXStart;
32 INT dy = nYEnd - nYStart;
40 if (dx > dy) { /* line is "more horizontal" */
41 err = 2*dy - dx; erradd = 2*dy - 2*dx;
42 for(cnt = 0;cnt <= dx; cnt++) {
43 callback(nXStart,nYStart,lParam);
52 } else { /* line is "more vertical" */
53 err = 2*dx - dy; erradd = 2*dx - 2*dy;
54 for(cnt = 0;cnt <= dy; cnt++) {
55 callback(nXStart,nYStart,lParam);