340{
356 BOOL UsesSource, UsesMask;
357 POINTL AdjustedBrushOrigin;
359 BOOLEAN bTopToBottom, bLeftToRight;
360
363
365 {
367 }
368 else
369 {
370 bLeftToRight =
FALSE;
371 }
372
374 {
376 }
377 else
378 {
379 bTopToBottom =
FALSE;
380 }
381
383 {
384
386 }
387
388
389
392
393 DPRINT(
"EngBitBlt: prclTrg: (%d,%d)-(%d,%d)\n",
395
396 DPRINT(
"EngBitBlt: OutputRect: (%d,%d)-(%d,%d)\n",
398
399 if (UsesSource)
400 {
402 {
404 }
405
406
407
409 if (InputPoint.
x < 0)
410 {
411 OutputRect.
left -= InputPoint.
x;
413 }
414 if (InputPoint.
y < 0)
415 {
416 OutputRect.
top -= InputPoint.
y;
418 }
419 if (
psoSrc->sizlBitmap.cx < InputPoint.
x +
421 {
423 psoSrc->sizlBitmap.cx - InputPoint.
x;
424 }
425 if (
psoSrc->sizlBitmap.cy < InputPoint.
y +
427 {
429 psoSrc->sizlBitmap.cy - InputPoint.
y;
430 }
431
432 InputRect.
left = InputPoint.
x;
434 InputRect.
top = InputPoint.
y;
436
438 }
439 else
440 {
441 InputPoint.
x = InputPoint.
y = 0;
446 }
447
449 {
450 if (OutputRect.
left <
pco->rclBounds.left)
451 {
452 InputRect.
left +=
pco->rclBounds.left - OutputRect.
left;
453 InputPoint.
x +=
pco->rclBounds.left - OutputRect.
left;
454 OutputRect.
left =
pco->rclBounds.left;
455 }
456 if (
pco->rclBounds.right < OutputRect.
right)
457 {
459 OutputRect.
right =
pco->rclBounds.right;
460 }
461 if (OutputRect.
top <
pco->rclBounds.top)
462 {
463 InputRect.
top +=
pco->rclBounds.top - OutputRect.
top;
464 InputPoint.
y +=
pco->rclBounds.top - OutputRect.
top;
465 OutputRect.
top =
pco->rclBounds.top;
466 }
467 if (
pco->rclBounds.bottom < OutputRect.
bottom)
468 {
470 OutputRect.
bottom =
pco->rclBounds.bottom;
471 }
472 }
473
474
475
476 if (OutputRect.
right <= OutputRect.
left ||
478 {
480 }
481
482 OutputObj = psoTrg;
483
485 {
488 }
489 else
490 {
491 AdjustedBrushOrigin.
x = 0;
492 AdjustedBrushOrigin.
y = 0;
493 }
494
495
497 {
499 }
500 else
501 {
502 clippingType =
pco->iDComplexity;
503 }
504
505
507 {
508
511 {
512
515 }
516 }
517
518 if (UsesMask)
519 {
521 }
523 {
524 if (
pbo &&
pbo->iSolidColor == 0xFFFFFFFF)
526 else
528 }
529 else
530 {
532 }
533
534
535 switch (clippingType)
536 {
538
539 if (bLeftToRight)
540 {
541 lTmp = OutputRect.
left;
543 OutputRect.
right = lTmp;
544 }
545
546 if (bTopToBottom)
547 {
548 lTmp = OutputRect.
top;
551 }
552
553 Ret = (*BltRectFunc)(OutputObj,
554 InputObj,
557 &OutputRect,
558 &InputPoint,
561 &AdjustedBrushOrigin,
563 break;
565
566 ClipRect.
left =
pco->rclBounds.left;
567 ClipRect.
right =
pco->rclBounds.right;
568 ClipRect.
top =
pco->rclBounds.top;
571 {
572#ifdef _USE_DIBLIB_
573 if (BrushOrigin)
574 {
575 AdjustedBrushOrigin.x = BrushOrigin->x + CombinedRect.
left - OutputRect.left;
576 AdjustedBrushOrigin.y = BrushOrigin->y + CombinedRect.
top - OutputRect.top;
577 }
578#endif
579 Pt.
x = InputPoint.x + CombinedRect.
left - OutputRect.left;
580 Pt.
y = InputPoint.y + CombinedRect.
top - OutputRect.top;
581 Ret = (*BltRectFunc)(OutputObj,
582 InputObj,
585 &CombinedRect,
586 &Pt,
589 &AdjustedBrushOrigin,
591 }
592 break;
595 if (OutputObj == InputObj)
596 {
597 if (OutputRect.top < InputPoint.y)
598 {
599 Direction = OutputRect.left < InputPoint.x ?
601 }
602 else
603 {
604 Direction = OutputRect.left < InputPoint.x ?
606 }
607 }
608 else
609 {
611 }
613 do
614 {
617
618 for (
i = 0;
i < RectEnum.
c;
i++)
619 {
625 {
626#ifdef _USE_DIBLIB_
627 if (BrushOrigin)
628 {
629 AdjustedBrushOrigin.x = BrushOrigin->x + CombinedRect.
left - OutputRect.left;
630 AdjustedBrushOrigin.y = BrushOrigin->y + CombinedRect.
top - OutputRect.top;
631 }
632#endif
633 Pt.
x = InputPoint.x + CombinedRect.
left - OutputRect.left;
634 Pt.
y = InputPoint.y + CombinedRect.
top - OutputRect.top;
635 Ret = (*BltRectFunc)(OutputObj,
636 InputObj,
639 &CombinedRect,
640 &Pt,
643 &AdjustedBrushOrigin,
645 }
646 }
647 }
648 while (EnumMore);
649 break;
650 }
651
652 return Ret;
653}
#define BRUSHOBJ_psoMask(pbo)
#define ROP4_USES_MASK(Rop4)
RECTL arcl[ENUM_RECT_LIMIT]
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION Direction
BOOL(APIENTRY * PBLTRECTFUNC)(SURFOBJ *OutputObj, SURFOBJ *InputObj, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *OutputRect, POINTL *InputPoint, POINTL *MaskOrigin, BRUSHOBJ *Brush, POINTL *BrushOrigin, ROP4 Rop4)
static BOOLEAN APIENTRY BltMask(SURFOBJ *psoDest, SURFOBJ *psoSource, SURFOBJ *psoMask, XLATEOBJ *ColorTranslation, RECTL *prclDest, POINTL *pptlSource, POINTL *pptlMask, BRUSHOBJ *pbo, POINTL *pptlBrush, ROP4 Rop4)
static BOOLEAN APIENTRY CallDibBitBlt(SURFOBJ *OutputObj, SURFOBJ *InputObj, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *OutputRect, POINTL *InputPoint, POINTL *MaskOrigin, BRUSHOBJ *pbo, POINTL *BrushOrigin, ROP4 Rop4)
static BOOLEAN APIENTRY BltPatCopy(SURFOBJ *Dest, SURFOBJ *Source, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *DestRect, POINTL *SourcePoint, POINTL *MaskPoint, BRUSHOBJ *pbo, POINTL *BrushPoint, DWORD Rop4)
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)
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclTrg
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL _In_opt_ BRUSHOBJ _In_opt_ POINTL _In_ ROP4 rop4
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ * pxlo
ENGAPI ULONG APIENTRY CLIPOBJ_cEnumStart(_Inout_ CLIPOBJ *pco, _In_ BOOL bAll, _In_ ULONG iType, _In_ ULONG iDirection, _In_ ULONG cLimit)
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL * pptlSrc
_In_ SURFOBJ _In_ CLIPOBJ * pco