ReactOS  0.4.15-dev-1184-g23e04ae
copybits.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS VGA display driver
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: win32ss/drivers/displays/vga/objects/copybits.c
5  * PURPOSE:
6  * PROGRAMMERS:
7  */
8 
9 #include <vgaddi.h>
10 
13  OUT SURFOBJ* DestObj,
14  IN SURFOBJ* SourceObj,
15  IN CLIPOBJ* ClipObj,
16  IN XLATEOBJ* XLateObj,
17  IN RECTL* DestRectL,
18  IN POINTL* SrcPointL)
19 {
20  BOOL Done = FALSE;
21 
22  if (STYPE_BITMAP == DestObj->iType && BMF_4BPP == DestObj->iBitmapFormat &&
23  STYPE_DEVICE == SourceObj->iType)
24  {
25  /* Screen to 4 BPP DIB */
26  DIB_BltFromVGA(SrcPointL->x, SrcPointL->y,
27  DestRectL->right - DestRectL->left,
28  DestRectL->bottom - DestRectL->top,
29  DestObj->pvScan0, DestObj->lDelta);
30  Done = TRUE;
31  }
32  else if (STYPE_DEVICE == DestObj->iType &&
33  STYPE_BITMAP == SourceObj->iType && BMF_4BPP == SourceObj->iBitmapFormat)
34  {
35  /* 4 BPP DIB to Screen */
36  DIB_BltToVGA(DestRectL->left, DestRectL->top,
37  DestRectL->right - DestRectL->left,
38  DestRectL->bottom - DestRectL->top,
39  SourceObj->pvScan0, SourceObj->lDelta,
40  0);
41  Done = TRUE;
42  }
43 
44  return Done;
45 }
#define STYPE_DEVICE
Definition: lmshare.h:24
#define IN
Definition: typedefs.h:39
#define STYPE_BITMAP
Definition: winddi.h:1175
#define TRUE
Definition: types.h:120
Definition: xlate.c:9
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
Definition: vgavideo.c:352
BOOL APIENTRY DrvCopyBits(OUT SURFOBJ *DestObj, IN SURFOBJ *SourceObj, IN CLIPOBJ *ClipObj, IN XLATEOBJ *XLateObj, IN RECTL *DestRectL, IN POINTL *SrcPointL)
Definition: copybits.c:12
void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod)
Definition: vgavideo.c:447
#define OUT
Definition: typedefs.h:40
#define APIENTRY
Definition: api.h:79