112{
122 POINTL AdjustedBrushOrigin;
124
131 RECTL InputToCombinedRect;
133
138
139 LONG cxSrc, cySrc, cxDest, cyDest;
140 BOOLEAN bLeftToRight, bTopToBottom;
142
143 DPRINT(
"Entering EngStretchBltROP: prclSrc: (%d/%d)-(%d/%d) prclDest: (%d,%d)-(%d,%d)\n",
146
151
152
153 if (((cxSrc < 0) && (cxDest < 0)) || ((cxSrc >= 0) && (cxDest >= 0)))
154 bLeftToRight =
FALSE;
155 else
157
158 if (((cySrc < 0) && (cyDest < 0)) || ((cySrc >= 0) && (cyDest >= 0)))
159 bTopToBottom =
FALSE;
160 else
162
163
167
169 {
170
172 }
173
174
175
177 {
179 }
180 else
181 {
182 clippingType = ClipRegion->iDComplexity;
183 }
184
187 {
190 }
192 {
195 }
196
197 if (UsesSource)
198 {
200 {
202 }
204
206 &Translate, &psoInput))
207 {
209 }
210
211 InputRect.
left += Translate.
x;
212 InputRect.
right += Translate.
x;
213 InputRect.
top += Translate.
y;
214 InputRect.
bottom += Translate.
y;
215 }
216 else
217 {
223 }
224
225 if (
NULL != ClipRegion)
226 {
227 if (OutputRect.
left < ClipRegion->rclBounds.left)
228 {
229 InputRect.
left += ClipRegion->rclBounds.left - OutputRect.
left;
230 OutputRect.
left = ClipRegion->rclBounds.left;
231 }
232 if (ClipRegion->rclBounds.right < OutputRect.
right)
233 {
234 InputRect.
right -= OutputRect.
right - ClipRegion->rclBounds.right;
235 OutputRect.
right = ClipRegion->rclBounds.right;
236 }
237 if (OutputRect.
top < ClipRegion->rclBounds.top)
238 {
239 InputRect.
top += ClipRegion->rclBounds.top - OutputRect.
top;
240 OutputRect.
top = ClipRegion->rclBounds.top;
241 }
242 if (ClipRegion->rclBounds.bottom < OutputRect.
bottom)
243 {
244 InputRect.
bottom -= OutputRect.
bottom - ClipRegion->rclBounds.bottom;
245 OutputRect.
bottom = ClipRegion->rclBounds.bottom;
246 }
247 }
248
249
250
252 {
253 if (UsesSource)
254 {
256 }
258 }
259
260 if (!
IntEngEnter(&EnterLeaveDest, psoDest, &OutputRect,
FALSE, &Translate, &psoOutput))
261 {
262 if (UsesSource)
263 {
265 }
267 }
268
269 OutputRect.
left += Translate.
x;
270 OutputRect.
right += Translate.
x;
271 OutputRect.
top += Translate.
y;
272 OutputRect.
bottom += Translate.
y;
273
274 if (BrushOrigin)
275 {
276 AdjustedBrushOrigin.
x = BrushOrigin->x + Translate.
x;
277 AdjustedBrushOrigin.
y = BrushOrigin->y + Translate.
y;
278 }
279 else
280 {
281 AdjustedBrushOrigin = Translate;
282 }
283
285
286 DstHeight = OutputRect.
bottom - OutputRect.
top;
287 DstWidth = OutputRect.
right - OutputRect.
left;
288 SrcHeight = InputRect.
bottom - InputRect.
top;
289 SrcWidth = InputRect.
right - InputRect.
left;
290
291 DPRINT(
"bLeftToRight is '%d' and bTopToBottom is '%d'.\n", bLeftToRight, bTopToBottom);
292
293 switch (clippingType)
294 {
296 if (bLeftToRight)
297 {
298 lTmp = OutputRect.
left;
300 OutputRect.
right = lTmp;
301 }
302
303 if (bTopToBottom)
304 {
305 lTmp = OutputRect.
top;
308 }
309
310 DPRINT(
"About to call CallDibStretchBlt: OutputRect: (%d,%d)-(%d,%d)\n",
312
313 Ret = (*BltRectFunc)(psoOutput, psoInput,
Mask,
314 ColorTranslation, &OutputRect, &InputRect, MaskOrigin,
315 pbo, &AdjustedBrushOrigin, Rop4);
316 break;
318
319 ClipRect.
left = ClipRegion->rclBounds.left + Translate.
x;
320 ClipRect.
right = ClipRegion->rclBounds.right + Translate.
x;
321 ClipRect.
top = ClipRegion->rclBounds.top + Translate.
y;
322 ClipRect.
bottom = ClipRegion->rclBounds.bottom + Translate.
y;
324 {
325 InputToCombinedRect.
top = InputRect.top + (CombinedRect.
top - OutputRect.top) * SrcHeight / DstHeight;
326 InputToCombinedRect.
bottom = InputRect.top + (CombinedRect.
bottom - OutputRect.top) * SrcHeight / DstHeight;
327 InputToCombinedRect.
left = InputRect.left + (CombinedRect.
left - OutputRect.left) * SrcWidth / DstWidth;
328 InputToCombinedRect.
right = InputRect.left + (CombinedRect.
right - OutputRect.left) * SrcWidth / DstWidth;
329
330 if (bLeftToRight)
331 {
332 lTmp = CombinedRect.
left;
334 CombinedRect.
right = lTmp;
335 }
336
337 if (bTopToBottom)
338 {
339 lTmp = CombinedRect.
top;
341 CombinedRect.
bottom = lTmp;
342 }
343
344 DPRINT(
"About to call CallDibStretchBlt: CombinedRect: (%d,%d)-(%d,%d)\n",
346
347 Ret = (*BltRectFunc)(psoOutput, psoInput,
Mask,
348 ColorTranslation,
349 &CombinedRect,
350 &InputToCombinedRect,
351 MaskOrigin,
353 &AdjustedBrushOrigin,
354 Rop4);
355 }
356 break;
358 if (psoOutput == psoInput)
359 {
360 if (OutputRect.top < InputRect.top)
361 {
362 Direction = OutputRect.left < InputRect.left ?
364 }
365 else
366 {
367 Direction = OutputRect.left < InputRect.left ?
369 }
370 }
371 else
372 {
374 }
376 do
377 {
380 for (
i = 0;
i < RectEnum.
c;
i++)
381 {
387 {
388 InputToCombinedRect.
top = InputRect.top + (CombinedRect.
top - OutputRect.top) * SrcHeight / DstHeight;
389 InputToCombinedRect.
bottom = InputRect.top + (CombinedRect.
bottom - OutputRect.top) * SrcHeight / DstHeight;
390 InputToCombinedRect.
left = InputRect.left + (CombinedRect.
left - OutputRect.left) * SrcWidth / DstWidth;
391 InputToCombinedRect.
right = InputRect.left + (CombinedRect.
right - OutputRect.left) * SrcWidth / DstWidth;
392
393 if (bLeftToRight)
394 {
395 lTmp = CombinedRect.
left;
397 CombinedRect.
right = lTmp;
398 }
399
400 if (bTopToBottom)
401 {
402 lTmp = CombinedRect.
top;
404 CombinedRect.
bottom = lTmp;
405 }
406
407 DPRINT(
"About to call CallDibStretchBlt: CombinedRect: (%d,%d)-(%d,%d)\n",
409
410 Ret = (*BltRectFunc)(psoOutput, psoInput,
Mask,
411 ColorTranslation,
412 &CombinedRect,
413 &InputToCombinedRect,
414 MaskOrigin,
416 &AdjustedBrushOrigin,
417 Rop4);
418 }
419 }
420 }
421 while (EnumMore);
422 break;
423 }
424
426 if (UsesSource)
427 {
429 }
430
431 return Ret;
432}
static BOOLEAN APIENTRY CallDibStretchBlt(SURFOBJ *psoDest, SURFOBJ *psoSource, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *OutputRect, RECTL *InputRect, POINTL *MaskOrigin, BRUSHOBJ *pbo, POINTL *BrushOrigin, ROP4 Rop4)
BOOLEAN(APIENTRY * PSTRETCHRECTFUNC)(SURFOBJ *OutputObj, SURFOBJ *InputObj, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *OutputRect, RECTL *InputRect, POINTL *MaskOrigin, BRUSHOBJ *pbo, POINTL *BrushOrigin, ROP4 Rop4)
BOOL APIENTRY IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave, SURFOBJ *psoDest, RECTL *DestRect, BOOL ReadOnly, POINTL *Translate, SURFOBJ **ppsoOutput)
BOOL APIENTRY IntEngLeave(PINTENG_ENTER_LEAVE EnterLeave)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define ROP4_USES_SOURCE(Rop4)
RECTL arcl[ENUM_RECT_LIMIT]
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION Direction
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
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)