Changeset 10453 for trunk/src/gdi32/region.cpp
- Timestamp:
- Feb 12, 2004, 1:44:13 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/region.cpp
r10442 r10453 1 /* $Id: region.cpp,v 1.3 8 2004-02-10 15:35:39sandervl Exp $ */1 /* $Id: region.cpp,v 1.39 2004-02-12 12:44:13 sandervl Exp $ */ 2 2 3 3 /* … … 2011 2011 //Returned region in device coordinates (undocumented behaviour) 2012 2012 //****************************************************************************** 2013 HRGN WIN32API PathToRegion( HDC hdc) 2014 { 2013 HRGN WIN32API PathToRegion(HDC hdc) 2014 { 2015 HRGN hrgn = 0, hrgnTemp = 0, hrgnwin = 0; 2016 2015 2017 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); 2016 2018 if(!pHps) … … 2020 2022 return NULLHANDLE; 2021 2023 } 2022 2023 HRGN hrgn, hrgnTemp, hrgnwin;2024 2025 2024 dprintf(("GDI32: PathToRegion %x", hdc)); 2026 2025 2027 2026 hrgnTemp = GpiPathToRegion(pHps->hps, 1, (pHps->polyFillMode == ALTERNATE_W) ? FPATH_ALTERNATE : FPATH_WINDING); 2028 if(hrgnTemp == NULLHANDLE) 2027 if(hrgnTemp == NULLHANDLE) { 2028 dprintf(("GpiPathToRegion failed with %x", WinGetLastError(0))); 2029 2029 goto error; 2030 } 2030 2031 2031 2032 hrgnwin = CreateRectRgn(1, 1, 2, 2); … … 2048 2049 DeleteObject(hrgnwin); 2049 2050 2051 if(hrgnTemp) 2052 GpiDestroyRegion(pHps->hps, hrgnTemp); 2053 2050 2054 SetLastError(ERROR_INVALID_HANDLE_W); //todo right error 2051 2055 return NULLHANDLE; … … 2054 2058 //Selects the current path as a clipping region for a device context, combining 2055 2059 //any existing clipping region by using the specified mode 2056 //TODO: Can be emulated with SelectClipRegion??2057 2060 //****************************************************************************** 2058 2061 BOOL WIN32API SelectClipPath(HDC hdc, int iMode) … … 2069 2072 2070 2073 if(hrgn == NULLHANDLE || ret == FALSE) { 2071 dprintf(("GDI32: SelectClipPath FAILED %x %d", hrgn, ret)); 2074 dprintf(("GDI32: SelectClipPath FAILED %x %d PRETEND success", hrgn, ret)); 2075 ret = TRUE; 2072 2076 } 2073 2077 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.