Changeset 9429 for trunk/src/gdi32/gdi32.cpp
- Timestamp:
- Nov 26, 2002, 11:53:12 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/gdi32.cpp
r9385 r9429 1 /* $Id: gdi32.cpp,v 1.8 4 2002-11-04 13:30:36sandervl Exp $ */1 /* $Id: gdi32.cpp,v 1.85 2002-11-26 10:53:08 sandervl Exp $ */ 2 2 3 3 /* … … 39 39 COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor) 40 40 { 41 dprintf(("GDI32: SetBkColor %x to %x", hdc, crColor));42 41 return(O32_SetBkColor(hdc, crColor)); 43 42 } … … 46 45 COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor) 47 46 { 48 COLORREF clr; 49 50 dprintf(("GDI32: SetTextColor %x to %x", hdc, crColor)); 51 clr = O32_SetTextColor(hdc, crColor); 52 return(clr); 47 return O32_SetTextColor(hdc, crColor); 53 48 } 54 49 //****************************************************************************** … … 77 72 break; 78 73 } 79 dprintf(("GDI32: GetStockObject %d returned %X\n", arg1, obj));80 74 return(obj); 81 75 } 82 76 //****************************************************************************** 83 77 //****************************************************************************** 84 ODINFUNCTION3(HPEN, CreatePen, int, fnPenStyle, int, nWidth, COLORREF,crColor)78 HPEN WIN32API CreatePen(int fnPenStyle, int nWidth, COLORREF crColor) 85 79 { 86 80 HPEN hPen; … … 100 94 HPEN hPen; 101 95 102 dprintf(("GDI32: CreatePenIndirect %x", lplgpn));103 96 hPen = O32_CreatePenIndirect(lplgpn); 104 97 if(hPen) STATS_CreatePenIndirect(hPen, lplgpn); … … 113 106 114 107 hPen = O32_ExtCreatePen(dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle); 115 dprintf(("GDI32: ExtCreatePen %x %x %x %x %x returned %x", dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle, hPen));116 108 if(hPen) STATS_ExtCreatePen(hPen, dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle); 117 109 return hPen; … … 125 117 hBrush = O32_CreatePatternBrush(hBitmap); 126 118 if(hBrush) STATS_CreatePatternBrush(hBrush, hBitmap); 127 128 dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", hBitmap, hBrush));129 119 return(hBrush); 130 120 } 131 121 //****************************************************************************** 132 122 //****************************************************************************** 133 ODINFUNCTION1(HBRUSH, CreateSolidBrush, COLORREF,color)123 HBRUSH WIN32API CreateSolidBrush(COLORREF color) 134 124 { 135 125 HBRUSH hBrush; … … 143 133 HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH *pLogBrush) 144 134 { 145 HBRUSH hBrush;135 HBRUSH hBrush; 146 136 147 137 hBrush = O32_CreateBrushIndirect((LPLOGBRUSH)pLogBrush); … … 156 146 HBRUSH hBrush; 157 147 158 dprintf(("GDI32: CreateHatchBrush %x %x", fnStyle, clrref));159 148 hBrush = O32_CreateHatchBrush(fnStyle, clrref); 160 149 if(hBrush) STATS_CreateHatchBrush(hBrush, fnStyle, clrref); … … 167 156 HBRUSH hBrush; 168 157 169 dprintf(("GDI32: CreateDIBPatternBrushPt %x %x", buffer, usage));170 158 hBrush = O32_CreateDIBPatternBrushPt(buffer, usage); 171 159 if(hBrush) STATS_CreateDIBPatternBrushPt(hBrush, buffer, usage); … … 234 222 //PF Open32 seems not to move coordinates to 0,0 in newHdc 235 223 MoveToEx(newHdc, 0, 0 , NULL); 236 dprintf(("CreateCompatibleDC %X returned %x", hdc, newHdc)); 224 237 225 return newHdc; 238 226 } 239 227 //****************************************************************************** 240 228 //****************************************************************************** 241 ODINFUNCTION1(BOOL, DeleteDC, HDC,hdc)229 BOOL WIN32API DeleteDC(HDC hdc) 242 230 { 243 231 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); … … 270 258 BOOL WIN32API StrokeAndFillPath(HDC hdc) 271 259 { 272 dprintf(("GDI32: StrokeAndFillPath %x", hdc));273 260 return O32_StrokeAndFillPath(hdc); 274 261 } … … 277 264 BOOL WIN32API StrokePath(HDC hdc) 278 265 { 279 dprintf(("GDI32: StrokePath %x", hdc));280 266 return O32_StrokePath(hdc); 281 267 } … … 284 270 int WIN32API SetBkMode( HDC hdc, int mode) 285 271 { 286 dprintf(("GDI32: SetBkMode %x %d (old %d)", hdc, mode, O32_GetBkMode(hdc)));287 272 return O32_SetBkMode(hdc, mode); 288 273 } … … 291 276 COLORREF WIN32API GetPixel( HDC hdc, int x, int y) 292 277 { 293 COLORREF color; 294 295 color = O32_GetPixel(hdc, x, y); 296 dprintf2(("GDI32: GetPixel %x (%d,%d) -> %x", hdc, x, y, color)); 297 return color; 278 return O32_GetPixel(hdc, x, y); 298 279 } 299 280 //****************************************************************************** … … 301 282 COLORREF WIN32API SetPixel( HDC hdc, int x, int y, COLORREF color) 302 283 { 303 dprintf2(("GDI32: SetPixel %x (%d,%d) %x", hdc, x, y, color));304 284 return O32_SetPixel(hdc, x, y, color); 305 285 } … … 312 292 COLORREF rc; 313 293 314 //// dprintf(("GDI32: SetPixelV\n"));315 294 rc = O32_SetPixel(arg1, arg2, arg3, arg4); 316 295 if(rc == GDI_ERROR) // || rc == COLOR_INVALID) … … 326 305 return FALSE; 327 306 } 328 dprintf(("GDI32: GetDCOrgEx %x (%d,%d)", hdc, lpPoint));329 307 return O32_GetDCOrgEx(hdc, lpPoint); 330 308 } … … 333 311 BOOL WIN32API AbortPath(HDC hdc) 334 312 { 335 dprintf(("GDI32: AbortPath %x", hdc));336 313 return O32_AbortPath(hdc); 337 314 } … … 340 317 BOOL WIN32API AngleArc( HDC arg1, int arg2, int arg3, DWORD arg4, float arg5, float arg6) 341 318 { 342 dprintf(("GDI32: AngleArc"));343 319 return O32_AngleArc(arg1, arg2, arg3, arg4, arg5, arg6); 344 320 } … … 347 323 BOOL WIN32API Arc( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) 348 324 { 349 dprintf(("GDI32: Arc"));350 325 return O32_Arc(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); 351 326 } … … 354 329 BOOL WIN32API ArcTo( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) 355 330 { 356 dprintf(("GDI32: ArcTo"));357 331 return O32_ArcTo(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); 358 332 } … … 361 335 BOOL WIN32API BeginPath(HDC hdc) 362 336 { 363 dprintf(("GDI32: BeginPath $x", hdc));364 337 return O32_BeginPath(hdc); 365 338 } … … 368 341 BOOL WIN32API Chord( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) 369 342 { 370 dprintf(("GDI32: Chord"));371 343 return O32_Chord(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); 372 344 } … … 375 347 BOOL WIN32API CloseFigure(HDC hdc) 376 348 { 377 dprintf(("GDI32: CloseFigure %x", hdc));378 349 return O32_CloseFigure(hdc); 379 350 } … … 423 394 HDC rc; 424 395 DEVMODEA devmode; 425 426 dprintf(("GDI32: CreateDCW"));427 396 428 397 if(arg4) … … 486 455 HDC hdc; 487 456 488 dprintf(("GDI32: CreateICA"));489 457 //SvL: Open32 tests for "DISPLAY" 490 458 if(lpszDriver && !strcmp(lpszDriver, "display")) { … … 516 484 HDC rc; 517 485 DEVMODEA devmode; 518 519 dprintf(("GDI32: CreateICW"));520 486 521 487 if(arg4) … … 583 549 BOOL WIN32API EndPath( HDC hdc) 584 550 { 585 dprintf(("GDI32: EndPath %x", hdc));586 551 return O32_EndPath(hdc); 587 552 } 588 553 //****************************************************************************** 589 554 //****************************************************************************** 590 ODINFUNCTION5(BOOL, Rectangle, HDC, hdc, int, left, int, top, int, right, int,bottom)555 BOOL WIN32API Rectangle(HDC hdc, int left, int top, int right, int bottom) 591 556 { 592 557 return O32_Rectangle(hdc, left, top, right, bottom); … … 594 559 //****************************************************************************** 595 560 //****************************************************************************** 561 #ifdef DEBUG 596 562 VOID dumpROP2(INT rop2) 597 563 { … … 660 626 break; 661 627 628 case R2_NOTXORPEN: 629 name = "R2_NOTXORPEN"; 630 break; 631 662 632 default: 663 633 name = "unknown mode!!!"; … … 667 637 dprintf((" ROP2 mode = %s",name)); 668 638 } 639 #endif 669 640 //****************************************************************************** 670 641 //****************************************************************************** 671 642 int WIN32API SetROP2( HDC hdc, int rop2) 672 643 { 673 dprintf(("GDI32: SetROP2 %x %x", hdc, rop2));674 644 #ifdef DEBUG 675 645 dumpROP2(rop2); … … 695 665 BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5) 696 666 { 697 dprintf(("GDI32: ExtFloodFill"));698 667 return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5); 699 668 } … … 702 671 BOOL WIN32API FillPath( HDC arg1) 703 672 { 704 dprintf(("GDI32: FillPath"));705 673 return O32_FillPath(arg1); 706 674 } … … 709 677 BOOL WIN32API FlattenPath( HDC arg1) 710 678 { 711 dprintf(("GDI32: FlattenPath"));712 679 return O32_FlattenPath(arg1); 713 680 } … … 716 683 BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4) 717 684 { 718 dprintf(("GDI32: FloodFill"));719 685 return O32_FloodFill(arg1, arg2, arg3, arg4); 720 686 } … … 723 689 int WIN32API GetArcDirection( HDC arg1) 724 690 { 725 dprintf(("GDI32: GetArcDirection"));726 691 return O32_GetArcDirection(arg1); 727 692 } … … 730 695 BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2) 731 696 { 732 dprintf(("GDI32: GetAspectRatioFilterEx"));733 697 return O32_GetAspectRatioFilterEx(arg1, arg2); 734 698 } … … 737 701 COLORREF WIN32API GetBkColor(HDC hdc) 738 702 { 739 COLORREF color; 740 741 color = O32_GetBkColor(hdc); 742 dprintf(("GDI32: GetBkColor %x returned %x", hdc, color)); 743 return color; 703 return O32_GetBkColor(hdc); 744 704 } 745 705 //****************************************************************************** … … 747 707 int WIN32API GetBkMode(HDC hdc) 748 708 { 749 int bkmode; 750 751 bkmode = O32_GetBkMode(hdc); 752 dprintf(("GDI32: GetBkMode %x returned %d", hdc, bkmode)); 753 return bkmode; 709 return O32_GetBkMode(hdc); 754 710 } 755 711 //****************************************************************************** … … 757 713 UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3) 758 714 { 759 dprintf(("GDI32: GetBoundsRect"));760 715 return O32_GetBoundsRect(arg1, arg2, arg3); 761 716 } … … 764 719 BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2) 765 720 { 766 dprintf(("GDI32: GetBrushOrgEx"));767 721 return O32_GetBrushOrgEx(arg1, arg2); 768 722 } … … 771 725 BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4) 772 726 { 773 dprintf(("GDI32: GetCharABCWidthsA"));774 727 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4); 775 728 } … … 817 770 BOOL rc; 818 771 819 dprintf(("GDI32: GetCurrentPositionEx %x", hdc));820 772 rc = O32_GetCurrentPositionEx(hdc, lpPoint); 821 773 dprintf(("GDI32: GetCurrentPositionEx returned %d (%d,%d)", rc, lpPoint->x, lpPoint->y)); … … 840 792 DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3) 841 793 { 842 dprintf(("GDI32: GetKerningPairsA"));843 794 return O32_GetKerningPairs(arg1, arg2, arg3); 844 795 } … … 847 798 DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3) 848 799 { 849 dprintf(("GDI32: GetKerningPairsW "));800 dprintf(("GDI32: GetKerningPairsW; might not work")); 850 801 // NOTE: This will not work as is (needs UNICODE support) 851 802 return O32_GetKerningPairs(arg1, arg2, arg3); … … 855 806 BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2) 856 807 { 857 dprintf(("GDI32: GetMiterLimit"));858 808 return O32_GetMiterLimit(arg1, arg2); 859 809 } … … 862 812 COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2) 863 813 { 864 dprintf(("GDI32: GetNearestColor\n"));865 814 return O32_GetNearestColor(arg1, arg2); 866 815 } … … 869 818 INT WIN32API GetPath( HDC hdc, PPOINT arg2, PBYTE arg3, int arg4) 870 819 { 871 dprintf(("GDI32: GetPath %x", hdc));872 820 return O32_GetPath(hdc, arg2, arg3, arg4); 873 821 } … … 876 824 int WIN32API GetPolyFillMode( HDC hdc) 877 825 { 878 dprintf(("GDI32: GetPolyFillMode", hdc));879 826 return O32_GetPolyFillMode(hdc); 880 827 } … … 883 830 int WIN32API GetROP2( HDC hdc) 884 831 { 885 dprintf(("GDI32: GetROP2 %x", hdc));886 832 return O32_GetROP2(hdc); 887 833 } … … 890 836 BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2) 891 837 { 892 dprintf(("GDI32: GetRasterizerCaps"));893 838 return O32_GetRasterizerCaps(arg1, arg2); 894 839 } … … 897 842 UINT WIN32API GetTextAlign( HDC hdc) 898 843 { 899 dprintf(("GDI32: GetTextAlign %x", hdc));900 844 return O32_GetTextAlign(hdc); 901 845 } … … 904 848 int WIN32API GetTextCharacterExtra( HDC hdc) 905 849 { 906 dprintf(("GDI32: GetTextCharacterExtra", hdc));907 850 return O32_GetTextCharacterExtra(hdc); 908 851 } … … 911 854 COLORREF WIN32API GetTextColor( HDC hdc) 912 855 { 913 COLORREF color; 914 915 color = O32_GetTextColor(hdc); 916 dprintf(("GDI32: GetTextColor %x -> %x", hdc, color)); 917 return color; 856 return O32_GetTextColor(hdc); 918 857 } 919 858 //****************************************************************************** … … 936 875 BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3) 937 876 { 938 dprintf(("GDI32: PolyBezier"));939 877 return O32_PolyBezier(arg1, arg2, (int)arg3); 940 878 } … … 943 881 BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3) 944 882 { 945 dprintf(("GDI32: PolyBezierTo"));946 883 return O32_PolyBezierTo(arg1, arg2, arg3); 947 884 } … … 950 887 BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4) 951 888 { 952 dprintf(("GDI32: PolyDraw"));953 889 return O32_PolyDraw(arg1, arg2, arg3, arg4); 954 890 } … … 957 893 BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4) 958 894 { 959 dprintf(("GDI32: PolyPolygon"));960 895 return O32_PolyPolygon(arg1, arg2, arg3, arg4); 961 896 } … … 964 899 BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount) 965 900 { 966 dprintf(("GDI32: PolyPolyline %x %x %x %d", hdc, lppt, lpdwPolyPoints, cCount));967 968 901 return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount); 969 902 } … … 972 905 BOOL WIN32API Polygon( HDC hdc, const POINT *lpPoints, int count) 973 906 { 974 dprintf(("GDI32: Polygon %x %x %d", hdc, lpPoints, count));975 907 return O32_Polygon(hdc, lpPoints, count); 976 908 } … … 997 929 HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2) 998 930 { 999 dprintf(("GDI32: ResetDCA\n"));1000 931 return (HDC)O32_ResetDC(arg1, arg2); 1001 932 } … … 1004 935 HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2) 1005 936 { 1006 dprintf(("GDI32: ResetDCW\n")); 937 dprintf(("GDI32: ResetDCW: not properly implemented")); 938 DebugInt3(); 1007 939 // NOTE: This will not work as is (needs UNICODE support) 1008 940 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2); … … 1013 945 { 1014 946 BOOL ret; 1015 1016 dprintf(("GDI32: RestoreDC %x %d", hdc, id));1017 947 1018 948 ret = O32_RestoreDC(hdc, id); … … 1026 956 BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7) 1027 957 { 1028 dprintf(("GDI32: RoundRect"));1029 958 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7); 1030 959 } … … 1035 964 int id; 1036 965 1037 dprintf(("GDI32: SaveDC %x", hdc));1038 966 id = O32_SaveDC(hdc); 1039 967 if(id == 0) { … … 1047 975 int WIN32API SetArcDirection( HDC arg1, int arg2) 1048 976 { 1049 dprintf(("GDI32: SetArcDirection"));1050 977 return O32_SetArcDirection(arg1, arg2); 1051 978 } … … 1054 981 UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3) 1055 982 { 1056 dprintf(("GDI32: SetBoundsRect"));1057 983 return O32_SetBoundsRect(arg1, arg2, arg3); 1058 984 } … … 1061 987 BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4) 1062 988 { 1063 BOOL rc; 1064 1065 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4); 1066 dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc)); 1067 return(rc); 1068 } 1069 //****************************************************************************** 1070 //****************************************************************************** 1071 ODINFUNCTION2(DWORD, SetMapperFlags, HDC, hdc, DWORD, dwFlag) 989 return O32_SetBrushOrgEx(arg1, arg2, arg3, arg4); 990 } 991 //****************************************************************************** 992 //****************************************************************************** 993 DWORD WIN32API SetMapperFlags(HDC hdc, DWORD dwFlag) 1072 994 { 1073 995 return O32_SetMapperFlags(hdc, dwFlag); … … 1075 997 //****************************************************************************** 1076 998 //****************************************************************************** 1077 ODINFUNCTION3(BOOL, SetMiterLimit, HDC, hdc, float, eNewLimit, float* ,peOldLimit)999 BOOL WIN32API SetMiterLimit(HDC hdc, float eNewLimit, float* peOldLimit) 1078 1000 { 1079 1001 return O32_SetMiterLimit(hdc, eNewLimit, peOldLimit); … … 1081 1003 //****************************************************************************** 1082 1004 //****************************************************************************** 1083 ODINFUNCTION2(int, SetPolyFillMode, HDC, hdc, int,iPolyFillMode)1005 int WIN32API SetPolyFillMode(HDC hdc, int iPolyFillMode) 1084 1006 { 1085 1007 return O32_SetPolyFillMode(hdc, iPolyFillMode); … … 1087 1009 //****************************************************************************** 1088 1010 //****************************************************************************** 1089 ODINFUNCTION2(UINT, SetTextAlign, HDC, hdc, UINT,fMode)1011 UINT WIN32API SetTextAlign(HDC hdc, UINT fMode) 1090 1012 { 1091 1013 return O32_SetTextAlign(hdc, fMode); … … 1093 1015 //****************************************************************************** 1094 1016 //****************************************************************************** 1095 ODINFUNCTION2(int, SetTextCharacterExtra, HDC, hdc, int,nCharExtra)1017 int WIN32API SetTextCharacterExtra(HDC hdc, int nCharExtra) 1096 1018 { 1097 1019 return O32_SetTextCharacterExtra(hdc, nCharExtra); … … 1099 1021 //****************************************************************************** 1100 1022 //****************************************************************************** 1101 ODINFUNCTION3(BOOL, SetTextJustification, HDC, hdc, int, nBreakExtra, int,nBreakCount)1023 BOOL WIN32API SetTextJustification(HDC hdc, int nBreakExtra, int nBreakCount) 1102 1024 { 1103 1025 return O32_SetTextJustification(hdc, nBreakExtra, nBreakCount); … … 1107 1029 BOOL WIN32API WidenPath( HDC hdc) 1108 1030 { 1109 dprintf(("GDI32: WidenPath %x", hdc));1110 1031 return O32_WidenPath(hdc); 1111 1032 } … … 1136 1057 BOOL WIN32API UpdateColors(HDC hdc) 1137 1058 { 1138 dprintf(("GDI32: UpdateColors\n"));1139 1059 return InvalidateRect(WindowFromDC(hdc), NULL, FALSE); 1140 1060 } … … 1321 1241 return (FALSE); 1322 1242 } 1323 1324 1243 1325 1244 /*****************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.