Partial implementation of PlgBlt
Warren_Baird at cimmetry.com
Warren_Baird at cimmetry.com
Wed Feb 5 17:29:08 CST 2003
ChangeLog:
Semi-implementation of PlgBlt stub.
Description:
Performs a bit-block transfer of the bits of color data from the specified
rectangle
in the source device context to the specified parallelogram in the
destination
device context.
This implementation is quite incomplete since it only works in the case
where
the destination parallelogram is in fact a rectangle. So it's just doing
what
BitBlt does.
Warren Baird : Warren_Baird at cimmetry.com
Xavier Servettaz
diff -ur clean/wine/graphics/bitblt.c wine/graphics/bitblt.c
--- clean/wine/graphics/bitblt.c Wed Jan 29 15:31:02 2003
+++ wine/graphics/bitblt.c Thu Jan 30 17:30:24 2003
@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <stdlib.h>
#include "gdi.h"
#include "wine/debug.h"
@@ -127,9 +128,31 @@
*
*/
BOOL WINAPI PlgBlt( HDC hdcDest, const POINT *lpPoint,
- HDC hdcSrc, INT nXDest, INT nYDest, INT nWidth,
+ HDC hdcSrc, INT nXSrc, INT nYSrc, INT nWidth,
INT nHeight, HBITMAP hbmMask, INT xMask, INT yMask)
{
- FIXME("PlgBlt, stub\n");
- return 1;
+
+ if (!hbmMask && lpPoint) {
+ /* if destination region is a rectangle */
+ static const int MIN_DIFF = 1; /* allow 1 unit */
+ if ( (abs(lpPoint[0].y - lpPoint[1].y) <= MIN_DIFF) &&
(abs(lpPoint[0].x - lpPoint[2].x) <= MIN_DIFF)) {
+ INT nXDest = lpPoint[0].x;
+ INT nYDest = lpPoint[0].y;
+ INT DWidth = nWidth;
+ INT DHeight = nHeight;
+ BitBlt(hdcDest,
+ nXDest,
+ nYDest,
+ DWidth,
+ DHeight,
+ hdcSrc,
+ nXSrc,
+ nYSrc,
+ SRCAND);
+ }
+ else {
+ FIXME("PlgBlt, stub when destination region is not a rectangle.\n");
+ }
+ }
+ return 1;
}
More information about the wine-patches
mailing list