Ignore:
Timestamp:
May 20, 2001, 11:47:58 AM (24 years ago)
Author:
sandervl
Message:

fixes

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:54 sandervl Exp $ */
     1/* $Id: transform.cpp,v 1.5 2001-05-20 09:47:58 sandervl Exp $ */
    22
    33/*
     
    4343{
    4444 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     }
    5545
    5646    dprintf(("LPtoDP %x %x %d", hdc, lpPoints, nCount));
    5747
    58     //GpiConvert doesn't like illegal values; TODO: check what NT does
     48#ifdef DEBUG
    5949    if(nCount && lpPoints) {
    60         hdcwidth  = hdcWidth(0, pHps);
    61         hdcheight = hdcHeight(0, pHps);
    6250        for(int i=0;i<nCount;i++) {
    6351            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
    7455    ret = O32_LPtoDP(hdc, lpPoints, nCount);
    7556#ifdef DEBUG
     
    10889            if(lpPoints[i].x > hdcwidth) {
    10990                dprintf(("WARNING: DPtoLP correcting x value; hdcwidth = %d", hdcwidth));
    110                 lpPoints[i].x = 0;
     91                lpPoints[i].x = hdcwidth;
    11192            }
    112             if(lpPoints[i].y > hdcwidth) {
     93            if(lpPoints[i].y > hdcheight) {
    11394                dprintf(("WARNING: DPtoLP correcting y value; hdcheight = %d", hdcheight));
    114                 lpPoints[i].y = 0;
     95                lpPoints[i].y = hdcheight;
    11596            }
    11697        }
Note: See TracChangeset for help on using the changeset viewer.