Ignore:
Timestamp:
Feb 10, 2004, 4:35:39 PM (22 years ago)
Author:
sandervl
Message:

Wrong GdiCopyClipRgn return value; Implemented SelectClipPath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/region.cpp

    r10434 r10442  
    1 /* $Id: region.cpp,v 1.37 2004-01-30 22:20:00 bird Exp $ */
     1/* $Id: region.cpp,v 1.38 2004-02-10 15:35:39 sandervl Exp $ */
    22
    33/*
     
    721721        dprintf(("ERROR: GdiCopyClipRgn: GpiCreateRegion failed!!"));
    722722        DebugInt3();
    723         return 0;
     723        return NULLHANDLE;
    724724    }
    725725    lComplexity = GpiCombineRegion(pHps->hps, hrgnNewClip, pHps->hrgnWin32Clip, NULLHANDLE, CRGN_COPY);
    726726    if (lComplexity != RGN_ERROR)
    727727    {
    728         return TRUE;
    729     }
     728        return hrgnNewClip;
     729    }
     730    dprintf(("GpiCombineRegion %x %x %x failed!!", pHps->hps, hrgnNewClip, pHps->hrgnWin32Clip));
    730731    DebugInt3();
    731     return FALSE;
     732    return NULLHANDLE;
    732733}
    733734//******************************************************************************
     
    808809        if(!interpretRegionAs(pHps, 0, hrgn, AS_DEVICE) )
    809810        {
     811            dprintf(("interpretRegionAs failed!!"));
    810812            return ERROR_W;
    811813        }
     
    857859        }
    858860   }
     861   dprintf(("GpiCombineRegion failed %x %x %x %d", hrgnCurrent, hrgnSrc1, hrgnSrc2, lMode));
    859862   GpiDestroyRegion(pHps->hps, hrgnCurrent); //delete newly created region
    860863
     
    20492052}
    20502053//******************************************************************************
     2054//Selects the current path as a clipping region for a device context, combining
     2055//any existing clipping region by using the specified mode
     2056//TODO: Can be emulated with SelectClipRegion??
     2057//******************************************************************************
     2058BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
     2059{
     2060    HRGN hrgn;
     2061    BOOL ret = FALSE;
     2062
     2063    hrgn = PathToRegion(hdc);
     2064    if(hrgn)
     2065    {
     2066        ret = ExtSelectClipRgn(hdc, hrgn, iMode) != ERROR_W;
     2067        DeleteObject(hrgn);
     2068    }
     2069
     2070    if(hrgn == NULLHANDLE || ret == FALSE) {
     2071        dprintf(("GDI32: SelectClipPath FAILED %x %d", hrgn, ret));
     2072    }
     2073    return ret;
     2074}
     2075//******************************************************************************
    20512076//Needs wrapper as this file includes os2.h!!
    20522077//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.