dibdrv: Pass color by value, not pointer
[wine/dibdrv.git] / dlls / winedib.drv / bitblt.c
blob3b07feb182d032661686e67783e32cb62b7eb317
1 /*
2 * DIBDRV bit-blit operations
4 * Copyright 2007 Jesse Allen
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
23 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "wine/debug.h"
28 #include "dibdrv.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(dibdrv);
32 /***********************************************************************
33 * DIBDRV_StretchBlt
35 BOOL DIBDRV_StretchBlt( DIBDRVPHYSDEV *physDevDst, INT xDst, INT yDst,
36 INT widthDst, INT heightDst,
37 DIBDRVPHYSDEV *physDevSrc, INT xSrc, INT ySrc,
38 INT widthSrc, INT heightSrc, DWORD rop )
40 INT i, min_width, min_height;
41 TRACE("stub %p %d %d %d %d %p %d %d %d %d %d\n", physDevDst, xDst, yDst, widthDst, heightDst,
42 physDevSrc, xSrc, ySrc, widthSrc, heightSrc, rop);
43 min_width = physDevDst->bmp->width - yDst < physDevSrc->bmp->width - ySrc ?
44 physDevDst->bmp->width - yDst : physDevSrc->bmp->width - ySrc;
45 min_height = physDevDst->bmp->height - xDst < physDevSrc->bmp->height - xSrc ?
46 physDevDst->bmp->height - xDst : physDevSrc->bmp->height - xSrc;
47 /* copy a scanline at a time */
48 for (i = 0; i < min_height; i++)
50 physDevDst->funcs->MoveXY( physDevDst->bmp, xDst, i + yDst );
51 physDevSrc->funcs->MoveXY( physDevSrc->bmp, xSrc, i + ySrc );
52 physDevDst->funcs->Copy( physDevDst->bmp, physDevSrc->bmp, min_width, physDevSrc->convs );
54 return TRUE;
57 /***********************************************************************
58 * DIBDRV_AlphaBlend
60 BOOL DIBDRV_AlphaBlend( DIBDRVPHYSDEV *devDst, INT xDst, INT yDst, INT widthDst, INT heightDst,
61 DIBDRVPHYSDEV *devSrc, INT xSrc, INT ySrc, INT widthSrc, INT heightSrc,
62 BLENDFUNCTION blendfn)
64 FIXME("stub\n");
65 return TRUE;
68 /***********************************************************************
69 * DIBDRV_BitBlt
71 BOOL DIBDRV_BitBlt( DIBDRVPHYSDEV *physDevDst, INT xDst, INT yDst,
72 INT width, INT height, DIBDRVPHYSDEV *physDevSrc,
73 INT xSrc, INT ySrc, DWORD rop )
75 TRACE("stub %p %d %d %d %d %p %d %d %u\n", physDevDst, xDst, yDst, width, height, physDevSrc,
76 xSrc, ySrc, rop);
77 return DIBDRV_StretchBlt( physDevDst, xDst, yDst, width, height, physDevSrc, xSrc, ySrc,
78 width, height, rop );
81 /***********************************************************************
82 * DIBDRV_PatBlt
84 BOOL DIBDRV_PatBlt( DIBDRVPHYSDEV *physDev, INT left, INT top, INT width, INT height, DWORD rop )
86 FIXME("stub\n");
87 return TRUE;