37 INT DstX, DstY, SrcX, SrcY;
43 EXLATEOBJ exloSrcRGB, exloDstRGB, exloRGBSrc;
46 DPRINT(
"DIB_16BPP_AlphaBlend: srcRect: (%d,%d)-(%d,%d), dstRect: (%d,%d)-(%d,%d)\n",
53 DPRINT1(
"BlendOp != AC_SRC_OVER\n");
69 DPRINT1(
"Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n");
73 if (!ColorTranslation)
75 DPRINT1(
"ColorTranslation must not be NULL!\n");
84 SrcY = SourceRect->
top;
86 while ( DstY < DestRect->
bottom )
88 SrcX = SourceRect->
left;
89 DstX = DestRect->
left;
90 while(DstX < DestRect->
right)
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));
109 SrcX = SourceRect->
left + ((DstX-DestRect->
left)*(SourceRect->
right - SourceRect->
left))
113 SrcY = SourceRect->
top + ((DstY-DestRect->
top)*(SourceRect->
bottom - SourceRect->
top))
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::@5074 col
BOOLEAN DIB_XXBPP_AlphaBlend(SURFOBJ *Dest, SURFOBJ *Source, RECTL *DestRect, RECTL *SourceRect, CLIPOBJ *ClipRegion, XLATEOBJ *ColorTranslation, BLENDOBJ *BlendObj)
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)