Changeset 5768 for trunk/src/gdi32/transform.cpp
- Timestamp:
- May 20, 2001, 11:47:58 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/transform.cpp
r5760 r5768 1 /* $Id: transform.cpp,v 1. 4 2001-05-19 19:43:54sandervl Exp $ */1 /* $Id: transform.cpp,v 1.5 2001-05-20 09:47:58 sandervl Exp $ */ 2 2 3 3 /* … … 43 43 { 44 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 45 56 46 dprintf(("LPtoDP %x %x %d", hdc, lpPoints, nCount)); 57 47 58 //GpiConvert doesn't like illegal values; TODO: check what NT does 48 #ifdef DEBUG 59 49 if(nCount && lpPoints) { 60 hdcwidth = hdcWidth(0, pHps);61 hdcheight = hdcHeight(0, pHps);62 50 for(int i=0;i<nCount;i++) { 63 51 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 } 52 } 53 } 54 #endif 74 55 ret = O32_LPtoDP(hdc, lpPoints, nCount); 75 56 #ifdef DEBUG … … 108 89 if(lpPoints[i].x > hdcwidth) { 109 90 dprintf(("WARNING: DPtoLP correcting x value; hdcwidth = %d", hdcwidth)); 110 lpPoints[i].x = 0;91 lpPoints[i].x = hdcwidth; 111 92 } 112 if(lpPoints[i].y > hdc width) {93 if(lpPoints[i].y > hdcheight) { 113 94 dprintf(("WARNING: DPtoLP correcting y value; hdcheight = %d", hdcheight)); 114 lpPoints[i].y = 0;95 lpPoints[i].y = hdcheight; 115 96 } 116 97 }
Note:
See TracChangeset
for help on using the changeset viewer.