- Fix the build (patch by Thomas Weidenmueller)
[reactos.git] / reactos / drivers / video / displays / vga / objects / transblt.c
1 #include "../vgaddi.h"
2 #include "../vgavideo/vgavideo.h"
3 #include "brush.h"
4 #include "bitblt.h"
5
6 #define NDEBUG
7 #include <debug.h>
8
9 BOOL STDCALL
10 DrvTransparentBlt(SURFOBJ* Dest,
11 SURFOBJ* Source,
12 CLIPOBJ* Clip,
13 XLATEOBJ* ColorTranslation,
14 RECTL* DestRect,
15 RECTL* SourceRect,
16 ULONG TransparentColor,
17 ULONG Reserved)
18 {
19 LONG dx, dy, sx, sy;
20
21 dx = abs(DestRect->right - DestRect->left);
22 dy = abs(DestRect->bottom - DestRect->top);
23
24 sx = abs(SourceRect->right - SourceRect->left);
25 sy = abs(SourceRect->bottom - SourceRect->top);
26
27 if(sx<dx) dx = sx;
28 if(sy<dy) dy = sy;
29
30 // FIXME: adjust using SourceRect
31 DIB_TransparentBltToVGA(DestRect->left, DestRect->top, dx, dy, Source->pvScan0, Source->lDelta, TransparentColor);
32
33 return TRUE;
34 }