Changeset 7635 for trunk/src/gdi32/gdi32.cpp
- Timestamp:
- Dec 15, 2001, 7:51:16 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/gdi32.cpp
r7330 r7635 1 /* $Id: gdi32.cpp,v 1.7 6 2001-11-13 15:42:05sandervl Exp $ */1 /* $Id: gdi32.cpp,v 1.77 2001-12-15 18:50:26 sandervl Exp $ */ 2 2 3 3 /* … … 25 25 #include <winuser32.h> 26 26 #include "font.h" 27 #include <stats.h> 27 28 28 29 #define DBG_LOCALLOG DBG_gdi32 … … 77 78 //****************************************************************************** 78 79 //****************************************************************************** 79 HBRUSH WIN32API CreatePatternBrush(HBITMAP arg1)80 {81 HBRUSH brush;82 83 brush = O32_CreatePatternBrush(arg1);84 dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", arg1, brush));85 return(brush);86 }87 //******************************************************************************88 //******************************************************************************89 80 ODINFUNCTION3(HPEN, CreatePen, int, fnPenStyle, int, nWidth, COLORREF, crColor) 90 81 { 82 HPEN hPen; 83 91 84 //CB: todo: PS_DOT is different in Win32 (. . . . and not - - - -) 92 85 // Open32 looks like LINETYPE_SHORTDASH instead of LINETYPE_DOT!!! 93 86 // -> difficult to fix without performance decrease! 94 87 95 return O32_CreatePen(fnPenStyle,nWidth,crColor); 88 hPen = O32_CreatePen(fnPenStyle,nWidth,crColor); 89 if(hPen) STATS_CreatePen(hPen, fnPenStyle,nWidth,crColor); 90 return hPen; 96 91 } 97 92 //****************************************************************************** … … 99 94 HPEN WIN32API CreatePenIndirect(const LOGPEN * lplgpn) 100 95 { 96 HPEN hPen; 97 101 98 dprintf(("GDI32: CreatePenIndirect %x", lplgpn)); 102 return O32_CreatePenIndirect(lplgpn); 99 hPen = O32_CreatePenIndirect(lplgpn); 100 if(hPen) STATS_CreatePenIndirect(hPen, lplgpn); 101 return hPen; 102 } 103 //****************************************************************************** 104 //****************************************************************************** 105 HPEN WIN32API ExtCreatePen(DWORD dwPenStyle, DWORD dwWidth, const LOGBRUSH *lplb, 106 DWORD dwStyleCount, const DWORD *lpStyle) 107 { 108 HPEN hPen; 109 110 hPen = O32_ExtCreatePen(dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle); 111 dprintf(("GDI32: ExtCreatePen %x %x %x %x %x returned %x", dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle, hPen)); 112 if(hPen) STATS_ExtCreatePen(hPen, dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle); 113 return hPen; 114 } 115 //****************************************************************************** 116 //****************************************************************************** 117 HBRUSH WIN32API CreatePatternBrush(HBITMAP hBitmap) 118 { 119 HBRUSH hBrush; 120 121 hBrush = O32_CreatePatternBrush(hBitmap); 122 if(hBrush) STATS_CreatePatternBrush(hBrush, hBitmap); 123 124 dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", hBitmap, hBrush)); 125 return(hBrush); 126 } 127 //****************************************************************************** 128 //****************************************************************************** 129 ODINFUNCTION1(HBRUSH, CreateSolidBrush, COLORREF, color) 130 { 131 HBRUSH hBrush; 132 133 hBrush = O32_CreateSolidBrush(color); 134 if(hBrush) STATS_CreateSolidBrush(hBrush, color); 135 return(hBrush); 136 } 137 //****************************************************************************** 138 //****************************************************************************** 139 HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH *pLogBrush) 140 { 141 HBRUSH hBrush; 142 143 hBrush = O32_CreateBrushIndirect((LPLOGBRUSH)pLogBrush); 144 dprintf(("GDI32: CreateBrushIndirect %x %x %x returned %x", pLogBrush->lbStyle, pLogBrush->lbColor, pLogBrush->lbHatch, hBrush)); 145 if(hBrush) STATS_CreateBrushIndirect(hBrush, (LPLOGBRUSH)pLogBrush); 146 return hBrush; 147 } 148 //****************************************************************************** 149 //****************************************************************************** 150 HBRUSH WIN32API CreateHatchBrush(int fnStyle, COLORREF clrref) 151 { 152 HBRUSH hBrush; 153 154 dprintf(("GDI32: CreateHatchBrush %x %x", fnStyle, clrref)); 155 hBrush = O32_CreateHatchBrush(fnStyle, clrref); 156 if(hBrush) STATS_CreateHatchBrush(hBrush, fnStyle, clrref); 157 return hBrush; 103 158 } 104 159 //****************************************************************************** … … 106 161 HBRUSH WIN32API CreateDIBPatternBrushPt( const VOID * buffer, UINT usage) 107 162 { 163 HBRUSH hBrush; 164 108 165 dprintf(("GDI32: CreateDIBPatternBrushPt %x %x", buffer, usage)); 109 return O32_CreateDIBPatternBrushPt(buffer, usage); 166 hBrush = O32_CreateDIBPatternBrushPt(buffer, usage); 167 if(hBrush) STATS_CreateDIBPatternBrushPt(hBrush, buffer, usage); 168 return hBrush; 110 169 } 111 170 /***************************************************************************** … … 151 210 } 152 211 else { 153 dprintf((" ERROR: CreateDIBPatternBrush (%08xh, %08xh) -> INVALID memory handle!!",212 dprintf(("!ERROR!: CreateDIBPatternBrush (%08xh, %08xh) -> INVALID memory handle!!", 154 213 hglbDIBPacked, fuColorSpec)); 155 214 } … … 166 225 if (!oldcp) /* If new DC is to be created */ 167 226 oldcp = GetDisplayCodepage(); 227 228 if(newHdc) STATS_CreateCompatibleDC(hdc, newHdc); 168 229 169 230 OSLibGpiSetCp(newHdc, oldcp); … … 197 258 } 198 259 260 STATS_DeleteDC(hdc); 199 261 return O32_DeleteDC(hdc); 200 262 } … … 310 372 dprintf(("GDI32: CloseFigure %x", hdc)); 311 373 return O32_CloseFigure(hdc); 312 }313 //******************************************************************************314 //******************************************************************************315 HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH *pLogBrush)316 {317 HBRUSH hBrush;318 319 hBrush = O32_CreateBrushIndirect((LPLOGBRUSH)pLogBrush);320 dprintf(("GDI32: CreateBrushIndirect %x %x %x returned %x", pLogBrush->lbStyle, pLogBrush->lbColor, pLogBrush->lbHatch, hBrush));321 return hBrush;322 374 } 323 375 //****************************************************************************** … … 342 394 if(hdc) { 343 395 OSLibGpiSetCp(hdc, GetDisplayCodepage()); 396 STATS_CreateDCA(hdc, lpszDriver, lpszDevice, lpszOutput, lpInitData); 344 397 } 345 398 … … 422 475 //****************************************************************************** 423 476 //****************************************************************************** 424 HBRUSH WIN32API CreateHatchBrush( int arg1, COLORREF arg2)425 {426 dprintf(("GDI32: CreateHatchBrush"));427 return O32_CreateHatchBrush(arg1, arg2);428 }429 //******************************************************************************430 //******************************************************************************431 477 HDC WIN32API CreateICA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput, 432 478 const DEVMODEA *lpdvmInit) 433 479 { 434 480 static char *szDisplay = "DISPLAY"; 481 HDC hdc; 435 482 436 483 dprintf(("GDI32: CreateICA")); … … 443 490 lpszDriver = lpszDevice; 444 491 } 445 return O32_CreateIC(lpszDriver, lpszDevice, lpszOutput, lpdvmInit); 492 hdc = O32_CreateIC(lpszDriver, lpszDevice, lpszOutput, lpdvmInit); 493 if(hdc) STATS_CreateICA(hdc, lpszDriver, lpszDevice, lpszOutput, lpdvmInit); 494 return hdc; 446 495 } 447 496 //****************************************************************************** … … 519 568 //****************************************************************************** 520 569 //****************************************************************************** 521 ODINFUNCTION1(HBRUSH, CreateSolidBrush, COLORREF, color)522 {523 return O32_CreateSolidBrush(color);524 }525 //******************************************************************************526 //******************************************************************************527 570 BOOL WIN32API Ellipse(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, 528 571 int nBottomRect) … … 631 674 //****************************************************************************** 632 675 //****************************************************************************** 633 int WIN32API EnumObjects( HDC hdc, int objType, GOBJENUMPROC objFunc, LPARAM lParam)634 {635 //calling convention differences636 dprintf(("ERROR: GDI32: EnumObjects STUB"));637 // return O32_EnumObjects(arg1, arg2, arg3, arg4);638 return 0;639 }640 //******************************************************************************641 //******************************************************************************642 676 int WIN32API Escape( HDC hdc, int nEscape, int cbInput, LPCSTR lpvInData, PVOID lpvOutData) 643 677 { … … 651 685 652 686 return rc; 653 }654 //******************************************************************************655 //******************************************************************************656 HPEN WIN32API ExtCreatePen( DWORD arg1, DWORD arg2, const LOGBRUSH * arg3, DWORD arg4, const DWORD * arg5)657 {658 dprintf(("GDI32: ExtCreatePen"));659 return O32_ExtCreatePen(arg1, arg2, arg3, arg4, arg5);660 687 } 661 688 //****************************************************************************** … … 778 805 dprintf(("GDI32: GetCharWidth32W might not work properly %x %x %x %x", hdc, iFirstChar, iLastChar, pWidthArray)); 779 806 return O32_GetCharWidth(hdc, iFirstChar, iLastChar, pWidthArray); 780 }781 //******************************************************************************782 //******************************************************************************783 HANDLE WIN32API GetCurrentObject( HDC hdc, UINT arg2)784 {785 dprintf(("GDI32: GetCurrentObject %x %x", hdc, arg2));786 return (HANDLE)O32_GetCurrentObject(hdc, arg2);787 807 } 788 808 //****************************************************************************** … … 1157 1177 //****************************************************************************** 1158 1178 //****************************************************************************** 1159 //******************************************************************************1160 //******************************************************************************1161 BOOL WIN32API UnrealizeObject( HGDIOBJ hObject)1162 {1163 dprintf(("GDI32: UnrealizeObject %x", hObject));1164 return O32_UnrealizeObject(hObject);1165 }1166 //******************************************************************************1167 //******************************************************************************1168 1179 BOOL WIN32API WidenPath( HDC hdc) 1169 1180 {
Note:
See TracChangeset
for help on using the changeset viewer.