36{
37 INT DstX, DstY, SrcX, SrcY;
43 EXLATEOBJ exloSrcRGB, exloDstRGB, exloRGBSrc;
45
46 DPRINT(
"DIB_16BPP_AlphaBlend: srcRect: (%d,%d)-(%d,%d), dstRect: (%d,%d)-(%d,%d)\n",
49
52 {
53 DPRINT1(
"BlendOp != AC_SRC_OVER\n");
55 }
57 {
60 }
62 {
65 }
67 SrcBpp != 32)
68 {
69 DPRINT1(
"Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n");
71 }
72
73 if (!ColorTranslation)
74 {
75 DPRINT1(
"ColorTranslation must not be NULL!\n");
77 }
78
83
84 SrcY = SourceRect->
top;
86 while ( DstY < DestRect->
bottom )
87 {
88 SrcX = SourceRect->
left;
89 DstX = DestRect->
left;
90 while(DstX < DestRect->
right)
91 {
96
100
102 DstPixel32.
col.red =
Clamp8((DstPixel32.
col.red * (255 - Alpha)) / 255 + SrcPixel32.
col.red) ;
103 DstPixel32.
col.green =
Clamp8((DstPixel32.
col.green * (255 - Alpha)) / 255 + SrcPixel32.
col.green) ;
104 DstPixel32.
col.blue =
Clamp8((DstPixel32.
col.blue * (255 - Alpha)) / 255 + SrcPixel32.
col.blue) ;
106 pfnDibPutPixel(Dest, DstX, DstY,
XLATEOBJ_iXlate(ColorTranslation, DstPixel32.
ul));
107
108 DstX++;
109 SrcX = SourceRect->
left + ((DstX-DestRect->
left)*(SourceRect->
right - SourceRect->
left))
111 }
112 DstY++;
113 SrcY = SourceRect->
top + ((DstY-DestRect->
top)*(SourceRect->
bottom - SourceRect->
top))
115 }
116
120
122}
static const BLENDFUNCTION BlendFunc
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
PFN_DIB_PutPixel DIB_PutPixel
BLENDFUNCTION BlendFunction
#define CONTAINING_RECORD(address, type, field)
struct NICEPIXEL32::@5079 col
static __inline UCHAR Clamp8(ULONG val)
DIB_FUNCTIONS DibFunctionsForBitmapFormat[]
#define DIB_GetSource(SourceSurf, sx, sy, ColorTranslation)
VOID(* PFN_DIB_PutPixel)(SURFOBJ *, LONG, LONG, ULONG)
#define BitsPerFormat(Format)
ENGAPI ULONG APIENTRY XLATEOBJ_iXlate(_In_ XLATEOBJ *pxlo, _In_ ULONG iColor)
VOID NTAPI EXLATEOBJ_vInitialize(_Out_ PEXLATEOBJ pexlo, _In_opt_ PALETTE *ppalSrc, _In_opt_ PALETTE *ppalDst, _In_ COLORREF crSrcBackColor, _In_ COLORREF crDstBackColor, _In_ COLORREF crDstForeColor)
VOID NTAPI EXLATEOBJ_vCleanup(_Inout_ PEXLATEOBJ pexlo)