mirror of
https://github.com/reactos/reactos.git
synced 2024-07-11 07:05:12 +00:00
VGA driver support for TransparentBlt
svn path=/trunk/; revision=1859
This commit is contained in:
parent
69a45c48b1
commit
1a4b287958
29
reactos/drivers/dd/vga/display/objects/transblt.c
Normal file
29
reactos/drivers/dd/vga/display/objects/transblt.c
Normal 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;
|
||||||
|
}
|
Loading…
Reference in a new issue