47 LONG PatternX = 0, PatternY = 0;
51 BOOLEAN bTopToBottom, bLeftToRight;
58 DPRINT(
"Dest BPP: %u, DestRect: (%d,%d)-(%d,%d)\n",
61 DstHeight = DestRect->
bottom - DestRect->
top;
62 DstWidth = DestRect->
right - DestRect->
left;
63 SrcHeight = SourceRect->
bottom - SourceRect->
top;
64 SrcWidth = SourceRect->
right - SourceRect->
left;
67 if (((SrcWidth < 0) && (DstWidth < 0)) || ((SrcWidth >= 0) && (DstWidth >= 0)))
72 if (((SrcHeight < 0) && (DstHeight < 0)) || ((SrcHeight >= 0) && (DstHeight >= 0)))
84 DPRINT(
"Source BPP: %u, SourceRect: (%d,%d)-(%d,%d)\n",
90 DPRINT(
"MaskSurf is not NULL.\n");
95 DstHeight = DestRect->
bottom - DestRect->
top;
96 DstWidth = DestRect->
right - DestRect->
left;
97 SrcHeight = SourceRect->
bottom - SourceRect->
top;
98 SrcWidth = SourceRect->
right - SourceRect->
left;
104 case BMF_1BPP: xxBPPMask = 0x1;
break;
105 case BMF_4BPP: xxBPPMask = 0xF;
break;
106 case BMF_8BPP: xxBPPMask = 0xFF;
break;
107 case BMF_16BPP: xxBPPMask = 0xFFFF;
break;
108 case BMF_24BPP: xxBPPMask = 0xFFFFFF;
break;
110 xxBPPMask = 0xFFFFFFFF;
112 DPRINT(
"xxBPPMask is 0x%x.\n", xxBPPMask);
116 DPRINT(
"UsesPattern is not NULL.\n");
119 PatternY = (DestRect->
top - BrushOrigin->
y) % PatternSurface->
sizlBitmap.
cy;
129 Pattern =
Brush->iSolidColor;
135 DPRINT(
"PatternSurface is not NULL.\n");
138 DPRINT(
"bLeftToRight is '%d' and bTopToBottom is '%d'.\n", bLeftToRight, bTopToBottom);
140 for (DesY = DestRect->
top; DesY < DestRect->
bottom; DesY++)
154 sy = SourceRect->
bottom-(DesY - DestRect->
top) * SrcHeight / DstHeight;
158 sy = SourceRect->
top+(DesY - DestRect->
top) * SrcHeight / DstHeight;
162 for (DesX = DestRect->
left; DesX < DestRect->
right; DesX++)
170 sx = SourceRect->
right - (DesX - DestRect->
left) * SrcWidth / DstWidth;
174 sx = SourceRect->
left+(DesX - DestRect->
left) * SrcWidth / DstWidth;
176 if (sx < 0 || sy < 0 ||
178 fnMask_GetPixel(MaskSurf, sx, sy) != 0)
184 if (UsesSource && CanDraw)
188 sx = SourceRect->
right-(DesX - DestRect->
left) * SrcWidth / DstWidth;
192 sx = SourceRect->
left + (DesX - DestRect->
left) * SrcWidth / DstWidth;
194 if (sx >= 0 && sy >= 0 &&
208 if (UsesPattern && PatternSurface)
210 Pattern = fnPattern_GetPixel(PatternSurface, PatternX, PatternY);
215 Dest = fnDest_GetPixel(DestSurf, DesX, DesY);
218 fnDest_PutPixel(DestSurf, DesX, DesY,
Color);
#define R3_OPINDEX_SRCCOPY
BOOLEAN DIB_XXBPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFOBJ *MaskSurf, SURFOBJ *PatternSurface, RECTL *DestRect, RECTL *SourceRect, POINTL *MaskOrigin, BRUSHOBJ *Brush, POINTL *BrushOrigin, XLATEOBJ *ColorTranslation, ROP4 ROP)
#define ROP4_USES_PATTERN(Rop4)
#define IS_VALID_ROP4(rop)
#define ROP4_USES_SOURCE(Rop4)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
PFN_DIB_PutPixel DIB_PutPixel
PFN_DIB_GetPixel DIB_GetPixel
ULONG DIB_DoRop(ULONG Rop, ULONG Dest, ULONG Source, ULONG Pattern)
DIB_FUNCTIONS DibFunctionsForBitmapFormat[]
ULONG(* PFN_DIB_GetPixel)(SURFOBJ *, LONG, LONG)
VOID(* PFN_DIB_PutPixel)(SURFOBJ *, LONG, LONG, ULONG)
#define BitsPerFormat(Format)
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
ENGAPI ULONG APIENTRY XLATEOBJ_iXlate(_In_ XLATEOBJ *pxlo, _In_ ULONG iColor)