Mercurial > dwindows
comparison os2/dw.c @ 1702:1b10b4534bc4
Fixed creating icons from other file types on OS/2.
Forgot the height was supposed to be double for the mask.
Currently there is no alpha support, will see about adding
it later for formats that support alpha.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 03 May 2012 17:45:57 +0000 |
parents | 4487f6bc9e8b |
children | 043db6b221c2 |
comparison
equal
deleted
inserted
replaced
1701:cc3aba44943e | 1702:1b10b4534bc4 |
---|---|
8908 | 8908 |
8909 /* Internal function to create an icon from an existing pixmap */ | 8909 /* Internal function to create an icon from an existing pixmap */ |
8910 HICN _create_icon(char *file, HPIXMAP src) | 8910 HICN _create_icon(char *file, HPIXMAP src) |
8911 { | 8911 { |
8912 HPIXMAP pntr = dw_pixmap_new(hwndApp, WinQuerySysValue(HWND_DESKTOP, SV_CXICON), WinQuerySysValue(HWND_DESKTOP, SV_CYICON), src->depth); | 8912 HPIXMAP pntr = dw_pixmap_new(hwndApp, WinQuerySysValue(HWND_DESKTOP, SV_CXICON), WinQuerySysValue(HWND_DESKTOP, SV_CYICON), src->depth); |
8913 HPIXMAP mask = dw_pixmap_new(hwndApp, pntr->width, pntr->height, 1); | 8913 HPIXMAP mask = dw_pixmap_new(hwndApp, pntr->width, pntr->height*2, 1); |
8914 HPIXMAP minipntr = dw_pixmap_new(hwndApp, pntr->width/2, pntr->height/2, src->depth); | 8914 HPIXMAP minipntr = dw_pixmap_new(hwndApp, pntr->width/2, pntr->height/2, src->depth); |
8915 HPIXMAP minimask = dw_pixmap_new(hwndApp, minipntr->width, minipntr->height, 1); | 8915 HPIXMAP minimask = dw_pixmap_new(hwndApp, minipntr->width, minipntr->height*2, 1); |
8916 ULONG oldcol = _foreground; | 8916 ULONG oldcol = _foreground; |
8917 POINTERINFO pi = {0}; | 8917 POINTERINFO pi = {0}; |
8918 | 8918 |
8919 /* Create the color pointers, stretching it to the necessary size */ | 8919 /* Create the color pointers, stretching it to the necessary size */ |
8920 dw_pixmap_stretch_bitblt(0, pntr, 0, 0, pntr->width, pntr->height, 0, src, 0, 0, src->width, src->height); | 8920 dw_pixmap_stretch_bitblt(0, pntr, 0, 0, pntr->width, pntr->height, 0, src, 0, 0, src->width, src->height); |