- Timestamp:
- May 19, 2001, 9:43:54 PM (24 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/gdi32.cpp
r5709 r5760 1 /* $Id: gdi32.cpp,v 1. 69 2001-05-15 10:34:01sandervl Exp $ */1 /* $Id: gdi32.cpp,v 1.70 2001-05-19 19:43:53 sandervl Exp $ */ 2 2 3 3 /* … … 517 517 //****************************************************************************** 518 518 //****************************************************************************** 519 BOOL WIN32API DPtoLP( HDC arg1, PPOINT arg2, int arg3)520 {521 dprintf(("GDI32: DPtoLP\n"));522 return O32_DPtoLP(arg1, arg2, arg3);523 }524 //******************************************************************************525 //******************************************************************************526 519 BOOL WIN32API Ellipse(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, 527 520 int nBottomRect) … … 984 977 //****************************************************************************** 985 978 //****************************************************************************** 986 BOOL WIN32API LPtoDP(HDC hdc, PPOINT lpPoints, int nCount)987 {988 BOOL ret;989 990 dprintf(("LPtoDP %x %x %d", hdc, lpPoints, nCount));991 #ifdef DEBUG992 if(nCount && lpPoints) {993 for(int i=0;i<nCount;i++) {994 dprintf(("LPtoDP in (%d,%d)", lpPoints[i].x, lpPoints[i].y));995 }996 }997 #endif998 ret = O32_LPtoDP(hdc, lpPoints, nCount);999 #ifdef DEBUG1000 if(nCount && lpPoints) {1001 for(int i=0;i<nCount;i++) {1002 dprintf(("LPtoDP out (%d,%d)", lpPoints[i].x, lpPoints[i].y));1003 }1004 }1005 #endif1006 return ret;1007 }1008 //******************************************************************************1009 //******************************************************************************1010 979 BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, 1011 980 int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2, -
trunk/src/gdi32/oslibgpi.h
r4602 r5760 1 /* $Id: oslibgpi.h,v 1. 9 2000-11-16 16:34:49sandervl Exp $ */1 /* $Id: oslibgpi.h,v 1.10 2001-05-19 19:43:54 sandervl Exp $ */ 2 2 3 3 /* … … 309 309 #define GreIntersectClipRectangle(a,b) (INT) _Gre32Entry4((ULONG)(HDC)(a),(ULONG)(PRECTL)(b),0L,0x00004075L) 310 310 311 #ifndef _OS2WIN_H 312 #define OPEN32API _System 313 314 BOOL OPEN32API _O32_LPtoDP( HDC, PPOINT, int ); 315 316 inline BOOL O32_LPtoDP(HDC a, PPOINT b, int c) 317 { 318 BOOL yyrc; 319 USHORT sel = RestoreOS2FS(); 320 321 yyrc = _O32_LPtoDP(a, b, c); 322 SetFS(sel); 323 324 return yyrc; 325 } 326 BOOL OPEN32API _O32_DPtoLP( HDC, PPOINT, int ); 327 328 inline BOOL O32_DPtoLP(HDC a, PPOINT b, int c) 329 { 330 BOOL yyrc; 331 USHORT sel = RestoreOS2FS(); 332 333 yyrc = _O32_DPtoLP(a, b, c); 334 SetFS(sel); 335 336 return yyrc; 337 } 338 311 339 #endif 340 #endif -
trunk/src/gdi32/region.cpp
r5607 r5760 1 /* $Id: region.cpp,v 1.2 0 2001-04-27 17:37:23sandervl Exp $ */1 /* $Id: region.cpp,v 1.21 2001-05-19 19:43:54 sandervl Exp $ */ 2 2 3 3 /* … … 66 66 //****************************************************************************** 67 67 //****************************************************************************** 68 staticLONG hdcHeight(HWND hwnd, pDCData pHps)68 LONG hdcHeight(HWND hwnd, pDCData pHps) 69 69 { 70 70 if(hwnd == 0 && pHps != 0) … … 111 111 //****************************************************************************** 112 112 //****************************************************************************** 113 staticLONG hdcWidth(HWND hwnd, pDCData pHps)113 LONG hdcWidth(HWND hwnd, pDCData pHps) 114 114 { 115 115 if(hwnd == 0 && pHps != 0) -
trunk/src/gdi32/transform.cpp
r5709 r5760 1 /* $Id: transform.cpp,v 1. 3 2001-05-15 10:34:02sandervl Exp $ */1 /* $Id: transform.cpp,v 1.4 2001-05-19 19:43:54 sandervl Exp $ */ 2 2 3 3 /* 4 * GDI32 coordinate & trans lformation code4 * GDI32 coordinate & transformation code 5 5 * 6 6 * Copyright 2000 Sander van Leeuwen (sandervl@xs4all.nl) … … 34 34 static const XFORM_W XFORMIdentity = { 1.0, 0.0, 0.0, 1.0, 0, 0 }; 35 35 36 //region.cpp (todo; move to header) 37 LONG hdcHeight(HWND hwnd, pDCData pHps); 38 LONG hdcWidth(HWND hwnd, pDCData pHps); 39 40 //****************************************************************************** 41 //****************************************************************************** 42 BOOL WIN32API LPtoDP(HDC hdc, PPOINT lpPoints, int nCount) 43 { 44 BOOL ret; 45 DWORD hdcwidth, hdcheight; 46 pDCData pHps; 47 48 pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); 49 if(!pHps) 50 { 51 dprintf(("WARNING: LPtoDP %x invalid handle!!", hdc)); 52 SetLastError(ERROR_INVALID_HANDLE_W); 53 return FALSE; 54 } 55 56 dprintf(("LPtoDP %x %x %d", hdc, lpPoints, nCount)); 57 58 //GpiConvert doesn't like illegal values; TODO: check what NT does 59 if(nCount && lpPoints) { 60 hdcwidth = hdcWidth(0, pHps); 61 hdcheight = hdcHeight(0, pHps); 62 for(int i=0;i<nCount;i++) { 63 dprintf(("LPtoDP in (%d,%d)", lpPoints[i].x, lpPoints[i].y)); 64 if(lpPoints[i].x > hdcwidth) { 65 dprintf(("WARNING: LPtoDP correcting x value; hdcwidth = %d", hdcwidth)); 66 lpPoints[i].x = 0; 67 } 68 if(lpPoints[i].y > hdcwidth) { 69 dprintf(("WARNING: LPtoDP correcting y value; hdcheight = %d", hdcheight)); 70 lpPoints[i].y = 0; 71 } 72 } 73 } 74 ret = O32_LPtoDP(hdc, lpPoints, nCount); 75 #ifdef DEBUG 76 if(nCount && lpPoints) { 77 for(int i=0;i<nCount;i++) { 78 dprintf(("LPtoDP out (%d,%d)", lpPoints[i].x, lpPoints[i].y)); 79 } 80 } 81 #endif 82 return ret; 83 } 84 //****************************************************************************** 85 //****************************************************************************** 86 BOOL WIN32API DPtoLP(HDC hdc, PPOINT lpPoints, int nCount) 87 { 88 BOOL ret; 89 DWORD hdcwidth, hdcheight; 90 pDCData pHps; 91 92 pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); 93 if(!pHps) 94 { 95 dprintf(("WARNING: DPtoLP %x invalid handle!!", hdc)); 96 SetLastError(ERROR_INVALID_HANDLE_W); 97 return FALSE; 98 } 99 100 dprintf(("GDI32: DPtoLP %x %x %d", hdc, lpPoints, nCount)); 101 102 //GpiConvert doesn't like illegal values; TODO: check what NT does 103 if(nCount && lpPoints) { 104 hdcwidth = hdcWidth(0, pHps); 105 hdcheight = hdcHeight(0, pHps); 106 for(int i=0;i<nCount;i++) { 107 dprintf(("DPtoLP in (%d,%d)", lpPoints[i].x, lpPoints[i].y)); 108 if(lpPoints[i].x > hdcwidth) { 109 dprintf(("WARNING: DPtoLP correcting x value; hdcwidth = %d", hdcwidth)); 110 lpPoints[i].x = 0; 111 } 112 if(lpPoints[i].y > hdcwidth) { 113 dprintf(("WARNING: DPtoLP correcting y value; hdcheight = %d", hdcheight)); 114 lpPoints[i].y = 0; 115 } 116 } 117 } 118 119 ret = O32_DPtoLP(hdc, lpPoints, nCount); 120 #ifdef DEBUG 121 if(nCount && lpPoints) { 122 for(int i=0;i<nCount;i++) { 123 dprintf(("DPtoLP out (%d,%d)", lpPoints[i].x, lpPoints[i].y)); 124 } 125 } 126 #endif 127 return ret; 128 } 36 129 //****************************************************************************** 37 130 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.