Mercurial > dwindows
comparison os2/dw.c @ 1244:db26b9622769
Fixed dw_pixmap_stretch_bitblt() on OS/2. Also cleaned up the code...
I think in some instances it may have been wrong for regular bitblt too.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 19 Oct 2011 08:55:24 +0000 |
parents | c191a562c14a |
children | 3cbd8de0b50b |
comparison
equal
deleted
inserted
replaced
1243:c191a562c14a | 1244:db26b9622769 |
---|---|
8968 HPS hpssrc; | 8968 HPS hpssrc; |
8969 POINTL ptl[4]; | 8969 POINTL ptl[4]; |
8970 int dheight, sheight; | 8970 int dheight, sheight; |
8971 int count = 3; | 8971 int count = 3; |
8972 | 8972 |
8973 /* Do some sanity checks */ | |
8974 if((srcheight == -1 || srcwidth == -1) && srcheight != srcwidth) | |
8975 return DW_ERROR_GENERAL; | |
8976 | |
8973 if(dest) | 8977 if(dest) |
8974 { | 8978 { |
8975 hpsdest = WinGetPS(dest); | 8979 hpsdest = WinGetPS(dest); |
8976 dheight = _get_height(dest); | 8980 dheight = _get_height(dest); |
8977 } | 8981 } |
8999 WinReleasePS(hpsdest); | 9003 WinReleasePS(hpsdest); |
9000 return DW_ERROR_GENERAL; | 9004 return DW_ERROR_GENERAL; |
9001 } | 9005 } |
9002 | 9006 |
9003 ptl[0].x = xdest; | 9007 ptl[0].x = xdest; |
9004 ptl[0].y = (dheight - ydest) - height; | 9008 ptl[0].y = dheight - (ydest + height); |
9005 ptl[1].x = ptl[0].x + width; | 9009 ptl[1].x = xdest + width; |
9006 ptl[1].y = dheight - ydest; | 9010 ptl[1].y = dheight - ydest; |
9007 ptl[2].x = xsrc; | 9011 ptl[2].x = xsrc; |
9008 ptl[2].y = sheight - (ysrc + height); | 9012 ptl[2].y = sheight - (ysrc + (srcheight != -1 ? srcheight : height)); |
9009 if(srcwidth != -1 && srcheigth != -1) | 9013 if(srcwidth != -1 && srcheight != -1) |
9010 { | 9014 { |
9011 count = 4; | 9015 count = 4; |
9012 ptl[3].x = ptl[2].x + srcwidth; | 9016 ptl[3].x = xsrc + srcwidth; |
9013 ptl[3].y = ptl[2].y + srcheight; | 9017 ptl[3].y = sheight - ysrc; |
9014 } | 9018 } |
9015 | 9019 |
9016 /* Handle transparency if requested */ | 9020 /* Handle transparency if requested */ |
9017 if(srcp && srcp->transcolor != DW_CLR_DEFAULT) | 9021 if(srcp && srcp->transcolor != DW_CLR_DEFAULT) |
9018 { | 9022 { |