VGA driver support for TransparentBlt

svn path=/trunk/; revision=1859
This commit is contained in:
Jason Filby 2001-05-02 12:29:51 +00:00
parent 69a45c48b1
commit 1a4b287958

View file

@ -0,0 +1,29 @@
#include <ntddk.h>
#define NDEBUG
#include <debug.h>
#include "../vgaddi.h"
#include "../vgavideo/vgavideo.h"
#include "brush.h"
#include "bitblt.h"
BOOL VGADDITransparentBlt(PSURFOBJ Dest, PSURFOBJ Source,
PCLIPOBJ Clip, PXLATEOBJ ColorTranslation,
PRECTL DestRect, PRECTL SourceRect,
ULONG TransparentColor, ULONG Reserved)
{
LONG dx, dy, sx, sy;
dx = abs(DestRect->right - DestRect->left);
dy = abs(DestRect->bottom - DestRect->top);
sx = abs(SourceRect->right - SourceRect->left);
sy = abs(SourceRect->bottom - SourceRect->top);
if(sx<dx) dx = sx;
if(sy<dy) dy = sy;
// FIXME: adjust using SourceRect
DIB_TransparentBltToVGA(DestRect->left, DestRect->top, dx, dy, Source->pvBits, Source->lDelta, TransparentColor);
return TRUE;
}