26{
34 RECTL rclDest = *DestRect;
35 POINTL ptlSrc = *SourcePoint;
38
39 DPRINT(
"Entering EngCopyBits with SourcePoint (%d,%d) and DestRect (%d,%d)-(%d,%d).\n",
40 SourcePoint->x, SourcePoint->y, DestRect->left, DestRect->top, DestRect->right, DestRect->bottom);
41
42 DPRINT(
"psoSource cx/cy is %d/%d and psoDest cx/cy is %d/%d.\n",
43 psoSource->sizlBitmap.cx, psoSource->sizlBitmap.cy, psoDest->sizlBitmap.cx, psoDest->sizlBitmap.cy);
44
45
46 if (DestRect->top > DestRect->bottom)
47 {
49 lTmp = DestRect->top;
50 DestRect->top = DestRect->bottom;
51 DestRect->bottom = lTmp;
52 rclDest = *DestRect;
53 }
54 else
55 {
57 }
58
59 DPRINT(
"bTopToBottom is '%d'.\n", bTopToBottom);
60
62
65
66
67 if (psoSource->sizlBitmap.cx - ptlSrc.
x < rclDest.
right - rclDest.
left)
68 rclDest.
right = rclDest.
left + psoSource->sizlBitmap.cx - ptlSrc.
x;
69 if (psoSource->sizlBitmap.cy - ptlSrc.
y < rclDest.
bottom - rclDest.
top)
70 rclDest.
bottom = rclDest.
top + psoSource->sizlBitmap.cy - ptlSrc.
y;
71
72
73 if (rclDest.
right > psoDest->sizlBitmap.cx)
74 rclDest.
right = psoDest->sizlBitmap.cx;
75 if (rclDest.
bottom > psoDest->sizlBitmap.cy)
76 rclDest.
bottom = psoDest->sizlBitmap.cy;
78 DestRect = &rclDest;
79
80
81
82
83
84
85
87 {
88
90 {
91
93 {
95 psoDest, psoSource, Clip, ColorTranslation, DestRect, SourcePoint);
96
98 }
99 }
100
101
103 {
104
106 {
108 psoDest, psoSource, Clip, ColorTranslation, DestRect, SourcePoint);
109
111 }
112 }
113
114
116 NULL, Clip, ColorTranslation, DestRect, SourcePoint,
118
120 }
121
122
123 if (!Clip)
124 {
126 }
127 else
128 {
129 clippingType = Clip->iDComplexity;
130 }
131
137
138 switch (clippingType)
139 {
144
145
146 if (bTopToBottom)
147 {
151 }
152
154 break;
155
158
160
163
164
165 if (bTopToBottom)
166 {
170 }
171
173 break;
174
178
179 do
180 {
182
184 {
187
188 do
189 {
191
194
195
196 if (bTopToBottom)
197 {
201 }
202
204 {
207 }
208
210
211 }
while (
prcl < prclEnd);
212 }
213
214 } while (EnumMore);
216 break;
217
218 default:
221 break;
222 }
223
226}
#define R3_OPINDEX_SRCCOPY
static void cleanup(void)
#define ROP4_FROM_INDEX(index)
PFN_DIB_BitBlt DIB_BitBltSrcCopy
XLATEOBJ * XlateSourceToDest
RECTL arcl[ENUM_RECT_LIMIT]
#define CONTAINING_RECORD(address, type, field)
DIB_FUNCTIONS DibFunctionsForBitmapFormat[]
BOOL APIENTRY IntEngBitBlt(SURFOBJ *psoTrg, SURFOBJ *psoSrc, SURFOBJ *psoMask, CLIPOBJ *pco, XLATEOBJ *pxlo, RECTL *prclTrg, POINTL *pptlSrc, POINTL *pptlMask, BRUSHOBJ *pbo, POINTL *pptlBrush, ROP4 Rop4)
#define GDIDEVFUNCS(SurfObj)
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
ENGAPI BOOL APIENTRY CLIPOBJ_bEnum(_In_ CLIPOBJ *pco, _In_ ULONG cj, _Out_bytecap_(cj) ULONG *pul)
ENGAPI ULONG APIENTRY CLIPOBJ_cEnumStart(_Inout_ CLIPOBJ *pco, _In_ BOOL bAll, _In_ ULONG iType, _In_ ULONG iDirection, _In_ ULONG cLimit)
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl