- Timestamp:
- Sep 27, 1999, 8:21:25 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r1064 r1073 1 /* $Id: dc.cpp,v 1. 7 1999-09-26 15:25:55 sandervlExp $ */1 /* $Id: dc.cpp,v 1.8 1999-09-27 18:21:25 dengert Exp $ */ 2 2 3 3 /* … … 24 24 #include <limits.h> 25 25 #include "oslibwin.h" 26 #include "dcdata.h" 27 28 #undef SEVERITY_ERROR 29 #include <winerror.h> 26 30 27 31 #ifndef OPEN32API … … 30 34 31 35 /*********************/ 32 typedef struct _tagXFORM33 {34 FLOAT eM11;35 FLOAT eM12;36 FLOAT eM21;37 FLOAT eM22;38 FLOAT eDx;39 FLOAT eDy;40 } XFORM_W, *PXFORM_W, *LPXFORM_W;41 42 36 typedef struct 43 37 { … … 159 153 #define MM_ANISOTROPIC_W 8 160 154 161 enum PS_Type { MICRO_CACHED, MICRO, NORMAL };162 enum HDC_Type{ TYPE_0, TYPE_1, TYPE_2, TYPE_3, TYPE_4 };163 164 typedef struct _DCData165 {166 HDC hdc;167 HWND hwnd;168 HPS hps;169 170 UINT lastBrushHandle;171 PVOID lastBrushObject;172 UINT lastPenHandle;173 pPenObject lastPenObject;174 UINT lastFontHandle;175 PVOID lastFontObject;176 UINT lastBitmapHandle;177 PVOID lastBitmapObject;178 UINT lastPaletteHandle;179 PVOID lastPaletteObject;180 181 UINT nullBitmapHandle;182 183 ULONG BkColor;184 ULONG TextColor;185 ULONG BkColor_PM;186 ULONG TextColor_PM;187 188 int BkMode;189 ULONG BkMode_PM;190 191 int ROP2Mode;192 int ROP2Mode_PM;193 194 unsigned isMemoryPS:1;195 unsigned isMetaPS:1;196 unsigned isPrinter:1;197 unsigned isFrameWindow:1;198 unsigned isOD_QUEUED:1;199 unsigned isOD_INFO:1;200 unsigned isClient:1;201 unsigned isClientArea:1;202 unsigned isLeftLeft:1;203 unsigned isTopTop:1;204 unsigned isWideLine:1;205 unsigned alignUpdateCP:1;206 unsigned isCacheable:1;207 unsigned penIsExtPen:1;208 unsigned isValid:1;209 unsigned inPath:1;210 unsigned isStartDoc:1;211 unsigned resetStockFonts:1;212 unsigned unused:14;213 214 ULONG MapMode;215 HBITMAP bitmapHandle;216 ULONG bitmapHeight;217 ULONG bitmapWidth;218 ULONG hMeta;219 PVOID pMetaFileObject;220 int polyFillMode;221 int arcDirection;222 int stretchBltMode;223 int graphicsMode;224 HRGN hrgnHDC;225 226 PS_Type psType;227 228 HDC_Type hdcType;229 USHORT usFiller;230 POINTL viewportOrg;231 double viewportXExt;232 double viewportYExt;233 POINTL windowOrg;234 SIZEL windowExt;235 HRGN hrgnVis;236 POINTL ptlOrigin;237 ULONG printPageHeight;238 PVOID printerObject;239 240 LONG taMode;241 XFORM_W xform;242 243 INT worldYDeltaFor1Pixel;244 INT worldXDeltaFor1Pixel;245 ULONG colorMode;246 PULONG pLogColorTable;247 248 ULONG lcidBitfield;249 250 HWND hwndRealize;251 ULONG cpeMap;252 253 LONG lTechnology;254 255 LONG lWndXExtSave, lWndYExtSave,256 lVwpXExtSave, lVwpYExtSave;257 258 int height;259 260 POINTL brushOrgPoint;261 262 PVOID pEnhMetaPalette;263 PVOID lpAbortProc;264 ULONG HPStoHDCInversionHeight;265 266 int saveLevel;267 268 struct _DCData *nextDCData;269 } tDCData, *pDCData;270 271 155 /*********************/ 272 156 … … 366 250 case MM_ISOTROPIC_W : flOptions = PU_LOMETRIC ; break; 367 251 default: 368 // SET_ERROR_WIN(ERROR_INVALID_PARAMETER_W);252 _O32_SetLastError (ERROR_INVALID_PARAMETER); 369 253 return FALSE; 370 254 } … … 391 275 if (DevEscape(pHps->hdc ? pHps->hdc : pHps->hps, DEVESC_SETPS, 12, (PBYTE)data, 0, 0) == DEVESC_ERROR) 392 276 { 393 // SET_ERROR_LAST();277 _O32_SetLastError (ERROR_INVALID_PARAMETER); 394 278 return 0; 395 279 } … … 699 583 if ( !lpps ) 700 584 { 701 // SET_ERROR_WIN( ERROR_INVALID_PARAMETER_W);585 _O32_SetLastError (ERROR_INVALID_PARAMETER); 702 586 return (HDC)NULLHANDLE; 703 587 } … … 712 596 if (!pHps) 713 597 { 714 // SET_ERROR_LAST();598 _O32_SetLastError (ERROR_INVALID_PARAMETER); 715 599 SetFS(sel); 716 600 return (HDC)NULLHANDLE; … … 802 686 if (hwnd) 803 687 { 804 // SET_ERROR_WIN( ERROR_INVALID_HANDLE_W);688 _O32_SetLastError (ERROR_INVALID_HANDLE); 805 689 return FALSE; 806 690 } … … 824 708 if (!pHps) 825 709 { 826 // SET_ERROR_WIN(ERROR_INVALID_HANDLE_W);710 _O32_SetLastError (ERROR_INVALID_HANDLE); 827 711 SetFS(sel); 828 712 return FALSE; … … 1024 908 _O32_DeleteObject (pHps->nullBitmapHandle); 1025 909 } 1026 // SET_ERROR_LAST();910 _O32_SetLastError (ERROR_INVALID_PARAMETER); 1027 911 SetFS(sel); 1028 912 return NULL; … … 1095 979 if (redraw & (RDW_FRAME_W | RDW_NOFRAME_W)) 1096 980 { 1097 // SET_ERROR_WIN( ERROR_NOT_SUPPORTED_W);981 _O32_SetLastError (ERROR_NOT_SUPPORTED); 1098 982 return FALSE; 1099 983 } … … 1112 996 if (!wnd) 1113 997 { 1114 // SET_ERROR_LAST();998 _O32_SetLastError (ERROR_INVALID_PARAMETER); 1115 999 SetFS(sel); 1116 1000 return FALSE; … … 1248 1132 wnd->setSupressErase (TRUE); 1249 1133 1250 //if (!success)1251 // SET_ERROR_LAST();1134 if (!success) 1135 _O32_SetLastError (ERROR_INVALID_PARAMETER); 1252 1136 1253 1137 SetFS(sel); … … 1312 1196 //Rectangle could be relative to parent window, so fix this 1313 1197 if(clientRect.yBottom != 0) { 1314 1315 1198 clientRect.yTop -= clientRect.yBottom; 1199 clientRect.yBottom = 0; 1316 1200 } 1317 1201 if(clientRect.xLeft != 0) { 1318 1319 1202 clientRect.xRight -= clientRect.xLeft; 1203 clientRect.xLeft = 0; 1320 1204 } 1321 1205 if(pScroll) { 1322 1323 1324 1325 1206 MapWin32ToOS2Rectl((RECT *)pScroll, (PRECTLOS2)&scrollRect); 1207 pScrollRect = &scrollRect; 1208 1209 //Scroll rectangle relative to client area 1326 1210 pScrollRect->xLeft += clientRect.xLeft; 1327 1211 pScrollRect->xRight += clientRect.xLeft; … … 1333 1217 1334 1218 if(pClip) { 1335 1336 1337 1338 1219 MapWin32ToOS2Rectl((RECT *)pClip, (PRECTLOS2)&clipRect); 1220 pClipRect = &clipRect; 1221 1222 //Clip rectangle relative to client area 1339 1223 pClipRect->xLeft += clientRect.xLeft; 1340 1224 pClipRect->xRight += clientRect.xLeft; … … 1355 1239 //TODO: Implement this one 1356 1240 //****************************************************************************** 1357 INT WIN32API ScrollWindowEx(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip, 1241 INT WIN32API ScrollWindowEx(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip, 1358 1242 HRGN hrgnUpdate, PRECT pRectUpdate, UINT scrollFlag) 1359 1243 { -
trunk/src/user32/dc.h
r1000 r1073 1 /* $Id: dc.h,v 1. 2 1999-09-21 17:03:29dengert Exp $ */1 /* $Id: dc.h,v 1.3 1999-09-27 18:21:25 dengert Exp $ */ 2 2 /* 3 3 * public dc functions … … 17 17 18 18 #endif //__DC_H__ 19
Note:
See TracChangeset
for help on using the changeset viewer.