Changeset 4552 for trunk/src/gdi32/line.cpp
- Timestamp:
- Nov 4, 2000, 5:29:24 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/line.cpp
r2802 r4552 1 /* $Id: line.cpp,v 1. 6 2000-02-16 14:18:10sandervl Exp $ */1 /* $Id: line.cpp,v 1.7 2000-11-04 16:29:24 sandervl Exp $ */ 2 2 /* 3 3 * Line API's … … 14 14 #include "callback.h" 15 15 #include "oslibgpi.h" 16 #include <dcdata.h> 16 17 17 18 #define DBG_LOCALLOG DBG_line … … 48 49 } 49 50 50 BOOL drawSingleLinePoint(HDC hdc, PVOIDpHps,PPOINTLOS2 pt)51 BOOL drawSingleLinePoint(HDC hdc,pDCData pHps,PPOINTLOS2 pt) 51 52 { 52 53 LOGPEN penInfo; … … 72 73 BOOL WIN32API MoveToEx( HDC hdc, int X, int Y, LPPOINT lpPoint) 73 74 { 74 PVOID pHps =OSLibGpiQueryDCData(hdc);75 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 75 76 76 77 dprintf(("GDI32: MoveToEx %x (%d,%d)", hdc, X, Y)); … … 79 80 { 80 81 POINTLOS2 newPoint = {X,Y}; 82 83 #ifndef INVERT 84 if(pHps->yInvert > 0) { 85 newPoint.y = pHps->yInvert - newPoint.y; 86 if (lpPoint) { 87 lpPoint->y = pHps->yInvert - lpPoint->y; 88 } 89 } 90 #endif 81 91 82 92 if (lpPoint) … … 105 115 BOOL WIN32API LineTo( HDC hdc, int nXEnd, int nYEnd) 106 116 { 107 PVOID pHps =OSLibGpiQueryDCData(hdc);117 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 108 118 BOOL rc = TRUE; 109 119 … … 114 124 POINTLOS2 oldPoint,newPoint; 115 125 BOOL bWideLine; 126 127 #ifndef INVERT 128 if (pHps->yInvert > 0) { 129 nYEnd = pHps->yInvert - nYEnd; 130 } 131 #endif 116 132 117 133 //CB: add metafile info … … 151 167 { 152 168 BOOL rc; 169 #ifndef STDCALL_ENUMPROCS 153 170 LineDDAProcCallback *callback = new LineDDAProcCallback(lpLineFunc, lpData); 171 #endif 154 172 POINTLOS2 startPt,endPt; 155 173 … … 160 178 toWin32LineEnd(&startPt,nXEnd,nYEnd,&endPt); 161 179 162 rc = O32_LineDDA(startPt.x,startPt.y,endPt.x,endPt.y,callback->GetOS2Callback(),(LPARAM)callback); 180 rc = O32_LineDDA(startPt.x,startPt.y,endPt.x,endPt.y, lpLineFunc, lpData); 181 #else 182 #ifdef STDCALL_ENUMPROCS 183 //should change os2win.h 184 rc = O32_LineDDA(nXStart,nYStart,nXEnd,nYEnd, (LINEDDAPROC_O32)lpLineFunc, lpData); 163 185 #else 164 186 rc = O32_LineDDA(nXStart,nYStart,nXEnd,nYEnd,callback->GetOS2Callback(),(LPARAM)callback); 165 #endif166 187 if(callback) 167 188 delete callback; 189 #endif 190 191 #endif 168 192 return(rc); 169 193 } … … 172 196 BOOL WIN32API Polyline( HDC hdc, const POINT *lppt, int cPoints) 173 197 { 174 PVOID pHps =OSLibGpiQueryDCData(hdc);198 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 175 199 176 200 dprintf(("GDI32: Polyline")); … … 186 210 { 187 211 SetLastError(ERROR_INVALID_PARAMETER); 188 189 212 return FALSE; 190 213 } … … 193 216 { 194 217 drawSingleLinePoint(hdc,pHps,(PPOINTLOS2)lppt); //CB: check metafile recording 195 196 218 return TRUE; 197 219 } … … 211 233 BOOL WIN32API PolylineTo( HDC hdc, const POINT * lppt, DWORD cCount) 212 234 { 213 PVOID pHps =OSLibGpiQueryDCData(hdc);235 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 214 236 215 237 dprintf(("GDI32: PolylineTo")); … … 228 250 { 229 251 drawSingleLinePoint(hdc,pHps,(PPOINTLOS2)lppt); 230 231 252 return TRUE; 232 253 }
Note:
See TracChangeset
for help on using the changeset viewer.