Changeset 111 for trunk/src/helpers/gpih.c
- Timestamp:
- Oct 18, 2001, 11:06:02 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/gpih.c
r94 r111 305 305 ptl1.y = prcl->yBottom; 306 306 GpiMove(hps, &ptl1); 307 ptl1.y = prcl->yTop -1;307 ptl1.y = prcl->yTop - 1; 308 308 GpiLine(hps, &ptl1); 309 ptl1.x = prcl->xRight -1;309 ptl1.x = prcl->xRight - 1; 310 310 GpiLine(hps, &ptl1); 311 311 ptl1.y = prcl->yBottom; … … 1973 1973 *@@ gpihIcon2Bitmap: 1974 1974 * this paints the given icon/pointer into 1975 * a bitmap. 1975 * a bitmap. Note that if the bitmap is 1976 * larget than the system icon size, only 1977 * the rectangle of the icon will be filled 1978 * with lBkgndColor. 1976 1979 * 1977 1980 * Returns FALSE upon errors. 1978 1981 * 1979 1982 *@@added V0.9.0 [umoeller] 1983 *@@changed V0.9.16 (2001-10-15) [umoeller]: added pptlLowerLeft 1984 *@@changed V0.9.16 (2001-10-15) [umoeller]: fixed inclusive/exclusive confusion (sigh...) 1980 1985 */ 1981 1986 … … 1983 1988 HPOINTER hptr, // in: source icon 1984 1989 LONG lBkgndColor, // in: background color for transparent areas 1990 PPOINTL pptlLowerLeft, // in: lower left corner of where to paint (ptr can be NULL) 1985 1991 ULONG ulIconSize) // in: icon size (should be the value of WinQuerySysValue(HWND_DESKTOP, SV_CXICON)) 1986 1992 { … … 2003 2009 if (WinQueryPointerInfo(hptr, &pi)) 2004 2010 { 2011 POINTL ptlLowerLeft = {0, 0}; 2005 2012 POINTL aptl[4]; 2006 2013 memset(aptl, 0, sizeof(POINTL) * 4); 2007 2014 2015 if (pptlLowerLeft) 2016 // lower left specified: V0.9.16 (2001-10-15) [umoeller] 2017 memcpy(&ptlLowerLeft, pptlLowerLeft, sizeof(POINTL)); 2018 2008 2019 // aptl[0]: target bottom-left, is all 0 2020 aptl[0].x = ptlLowerLeft.x; 2021 aptl[0].y = ptlLowerLeft.y; 2009 2022 2010 2023 // aptl[1]: target top-right (inclusive!) 2011 aptl[1].x = ulIconSize; 2012 aptl[1].y = ulIconSize; 2024 // V0.9.16 (2001-10-15) [umoeller]: fixed rectangle confusion 2025 aptl[1].x = ptlLowerLeft.x + ulIconSize - 1; 2026 aptl[1].y = ptlLowerLeft.y + ulIconSize - 1; 2013 2027 2014 2028 // aptl[2]: source bottom-left, is all 0 2015 2029 2016 2030 // aptl[3]: source top-right (exclusive!) 2017 aptl[3].x = ulIconSize + 1; 2018 aptl[3].y = ulIconSize + 1; 2031 // V0.9.16 (2001-10-15) [umoeller]: fixed rectangle confusion 2032 aptl[3].x = ulIconSize; // + 1; 2033 aptl[3].y = ulIconSize; // + 1; 2019 2034 2020 2035 GpiSetColor(hpsMem, CLR_WHITE); … … 2024 2039 2025 2040 // work on the AND image 2026 GpiWCBitBlt(hpsMem, 2027 pi.hbmPointer, 2041 GpiWCBitBlt(hpsMem, // target 2042 pi.hbmPointer, // src bmp 2028 2043 4L, // must always be 4 2029 2044 &aptl[0], // point array … … 2042 2057 GpiSetColor(hpsMem, lBkgndColor); 2043 2058 // work on the XOR image 2044 aptl[2].y = ulIconSize; 2045 aptl[3].y = (ulIconSize * 2) + 1; 2059 aptl[2].y = ulIconSize; // exclusive 2060 aptl[3].y = (ulIconSize * 2); // /* + 1; */ // exclusive 2061 // V0.9.16 (2001-10-15) [umoeller]: fixed rectangle confusion 2046 2062 GpiWCBitBlt(hpsMem, 2047 2063 pi.hbmPointer,
Note:
See TracChangeset
for help on using the changeset viewer.