Changeset 10442 for trunk/src


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

Wrong GdiCopyClipRgn return value; Implemented SelectClipPath

Location:
trunk/src/gdi32
Files:
3 edited

Legend:

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

    r10373 r10442  
    1 /* $Id: devcontext.cpp,v 1.1 2004-01-11 11:42:09 sandervl Exp $ */
     1/* $Id: devcontext.cpp,v 1.2 2004-02-10 15:35:38 sandervl Exp $ */
    22
    33/*
     
    364364    }
    365365    //overwrite the current clip region with the copy
     366    dprintf2(("New win32 clip region %x", hClipRgn));
    366367    pHps->hrgnWin32Clip = hClipRgn;
    367368    return id;
     
    393394        // Activate previous clip region
    394395        GdiCombineVisRgnClipRgn(pHps, pHps->hrgnWin32Clip, RGN_AND);
     396
     397        dprintf2(("New win32 clip region %x", pHps->hrgnWin32Clip));
    395398    }
    396399    return ret;
  • trunk/src/gdi32/gdi32.cpp

    r10434 r10442  
    1 /* $Id: gdi32.cpp,v 1.92 2004-01-30 22:19:59 bird Exp $ */
     1/* $Id: gdi32.cpp,v 1.93 2004-02-10 15:35:38 sandervl Exp $ */
    22
    33/*
     
    831831}
    832832//******************************************************************************
    833 //Selects the current path as a clipping region for a device context, combining
    834 //any existing clipping region by using the specified mode
    835 //TODO: Can be emulated with SelectClipRegion??
    836 //******************************************************************************
    837 BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
    838 {
    839   dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
    840   return(TRUE);
    841 }
    842 //******************************************************************************
    843833//TODO: Sets the color adjustment values for a device context. (used to adjust
    844834//      the input color of the src bitmap for calls of StretchBlt & StretchDIBits
  • 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.