4 * Copyright 1993 Bob Amstadt
10 #include "wine/wingdi16.h"
12 /**********************************************************************
15 void WINAPI
LineDDA16( INT16 nXStart
, INT16 nYStart
, INT16 nXEnd
, INT16 nYEnd
,
16 LINEDDAPROC16 callback
, LPARAM lParam
)
18 LineDDA( nXStart
, nYStart
, nXEnd
, nYEnd
,
19 (LINEDDAPROC
)callback
, lParam
);
23 /**********************************************************************
24 * LineDDA32 (GDI32.248)
26 BOOL WINAPI
LineDDA(INT nXStart
, INT nYStart
, INT nXEnd
, INT nYEnd
,
27 LINEDDAPROC callback
, LPARAM lParam
)
29 INT xadd
= 1, yadd
= 1;
32 INT dx
= nXEnd
- nXStart
;
33 INT dy
= nYEnd
- nYStart
;
41 if (dx
> dy
) { /* line is "more horizontal" */
42 err
= 2*dy
- dx
; erradd
= 2*dy
- 2*dx
;
43 for(cnt
= 0;cnt
<= dx
; cnt
++) {
44 callback(nXStart
,nYStart
,lParam
);
53 } else { /* line is "more vertical" */
54 err
= 2*dx
- dy
; erradd
= 2*dx
- 2*dy
;
55 for(cnt
= 0;cnt
<= dy
; cnt
++) {
56 callback(nXStart
,nYStart
,lParam
);