ReactOS 0.4.16-dev-292-gbbdcc14
inteng.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _RECT_ENUM
 
struct  tagSPAN
 

Macros

#define ENUM_RECT_LIMIT   32
 
#define ROP2_TO_MIX(Rop2)   (((Rop2) << 8) | (Rop2))
 
#define ROP4_FROM_INDEX(index)   ((index) | ((index) << 8))
 
#define ROP4_USES_DEST(Rop4)   ((((Rop4) & 0xAAAA) >> 1) != ((Rop4) & 0x5555))
 
#define ROP4_USES_SOURCE(Rop4)   ((((Rop4) & 0xCCCC) >> 2) != ((Rop4) & 0x3333))
 
#define ROP4_USES_PATTERN(Rop4)   ((((Rop4) & 0xF0F0) >> 4) != ((Rop4) & 0x0F0F))
 
#define ROP4_USES_MASK(Rop4)   ((((Rop4) & 0xFF00) >> 8) != ((Rop4) & 0x00ff))
 
#define IS_VALID_ROP4(rop)   (((rop) & 0xFFFF0000) == 0)
 
#define ROP4_FGND(Rop4)   ((Rop4) & 0x00FF)
 
#define ROP4_BKGND(Rop4)   (((Rop4) & 0xFF00) >> 8)
 
#define ROP4_NOOP   (R3_OPINDEX_NOOP | (R3_OPINDEX_NOOP << 8))
 
#define ROP4_MASK   (R3_OPINDEX_SRCCOPY | (R3_OPINDEX_NOOP << 8))
 
#define ROP4_MASKPAINT   (R3_OPINDEX_PATCOPY | (R3_OPINDEX_NOOP << 8))
 

Typedefs

typedef ULONG HCLIP
 
typedef struct _RECT_ENUM RECT_ENUM
 
typedef struct tagSPAN SPAN
 
typedef struct tagSPANPSPAN
 

Enumerations

enum  _R3_ROPCODES {
  R3_OPINDEX_NOOP = 0xAA , R3_OPINDEX_BLACKNESS = 0x00 , R3_OPINDEX_NOTSRCERASE = 0x11 , R3_OPINDEX_NOTSRCCOPY = 0x33 ,
  R3_OPINDEX_SRCERASE = 0x44 , R3_OPINDEX_DSTINVERT = 0x55 , R3_OPINDEX_PATINVERT = 0x5A , R3_OPINDEX_SRCINVERT = 0x66 ,
  R3_OPINDEX_SRCAND = 0x88 , R3_OPINDEX_MERGEPAINT = 0xBB , R3_OPINDEX_MERGECOPY = 0xC0 , R3_OPINDEX_SRCCOPY = 0xCC ,
  R3_OPINDEX_SRCPAINT = 0xEE , R3_OPINDEX_PATCOPY = 0xF0 , R3_OPINDEX_PATPAINT = 0xFB , R3_OPINDEX_WHITENESS = 0xFF
}
 

Functions

BOOL APIENTRY IntEngLineTo (SURFOBJ *Surface, CLIPOBJ *Clip, BRUSHOBJ *Brush, LONG x1, LONG y1, LONG x2, LONG y2, RECTL *RectBounds, MIX mix)
 
BOOL APIENTRY IntEngBitBlt (SURFOBJ *DestObj, SURFOBJ *SourceObj, SURFOBJ *Mask, CLIPOBJ *ClipRegion, XLATEOBJ *ColorTranslation, RECTL *DestRect, POINTL *SourcePoint, POINTL *MaskOrigin, BRUSHOBJ *Brush, POINTL *BrushOrigin, ROP4 Rop4)
 
BOOL APIENTRY IntEngStretchBlt (SURFOBJ *DestObj, SURFOBJ *SourceObj, SURFOBJ *Mask, CLIPOBJ *ClipRegion, XLATEOBJ *ColorTranslation, COLORADJUSTMENT *pca, RECTL *DestRect, RECTL *SourceRect, POINTL *pMaskOrigin, BRUSHOBJ *Brush, POINTL *BrushOrigin, ULONG Mode)
 
BOOL APIENTRY IntEngGradientFill (SURFOBJ *psoDest, CLIPOBJ *pco, XLATEOBJ *pxlo, TRIVERTEX *pVertex, ULONG nVertex, PVOID pMesh, ULONG nMesh, RECTL *prclExtents, POINTL *pptlDitherOrg, ULONG ulMode)
 
BOOL APIENTRY IntEngPolyline (SURFOBJ *DestSurf, CLIPOBJ *Clip, BRUSHOBJ *Brush, CONST LPPOINT pt, LONG dCount, MIX mix)
 
VOID FASTCALL IntEngUpdateClipRegion (XCLIPOBJ *Clip, ULONG count, const RECTL *pRect, const RECTL *rcBounds)
 
VOID FASTCALL IntEngInitClipObj (XCLIPOBJ *Clip)
 
VOID FASTCALL IntEngFreeClipResources (XCLIPOBJ *Clip)
 
BOOL FASTCALL IntEngTransparentBlt (SURFOBJ *Dest, SURFOBJ *Source, CLIPOBJ *Clip, XLATEOBJ *ColorTranslation, PRECTL DestRect, PRECTL SourceRect, ULONG iTransColor, ULONG Reserved)
 
BOOL APIENTRY IntEngPaint (_In_ SURFOBJ *pso, _In_ CLIPOBJ *pco, _In_ BRUSHOBJ *pbo, _In_ POINTL *pptlBrushOrg, _In_ __in_data_source(USER_MODE) MIX mix)
 
BOOL APIENTRY IntEngAlphaBlend (_Inout_ SURFOBJ *psoDest, _In_ SURFOBJ *psoSource, _In_opt_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ RECTL *prclDest, _In_ RECTL *prclSrc, _In_ BLENDOBJ *pBlendObj)
 
BOOL APIENTRY IntEngCopyBits (SURFOBJ *psoDest, SURFOBJ *psoSource, CLIPOBJ *pco, XLATEOBJ *pxlo, RECTL *prclDest, POINTL *ptlSource)
 

Macro Definition Documentation

◆ ENUM_RECT_LIMIT

#define ENUM_RECT_LIMIT   32

Definition at line 5 of file inteng.h.

◆ IS_VALID_ROP4

#define IS_VALID_ROP4 (   rop)    (((rop) & 0xFFFF0000) == 0)

Definition at line 49 of file inteng.h.

◆ ROP2_TO_MIX

#define ROP2_TO_MIX (   Rop2)    (((Rop2) << 8) | (Rop2))

Definition at line 40 of file inteng.h.

◆ ROP4_BKGND

#define ROP4_BKGND (   Rop4)    (((Rop4) & 0xFF00) >> 8)

Definition at line 52 of file inteng.h.

◆ ROP4_FGND

#define ROP4_FGND (   Rop4)    ((Rop4) & 0x00FF)

Definition at line 51 of file inteng.h.

◆ ROP4_FROM_INDEX

#define ROP4_FROM_INDEX (   index)    ((index) | ((index) << 8))

Definition at line 42 of file inteng.h.

◆ ROP4_MASK

#define ROP4_MASK   (R3_OPINDEX_SRCCOPY | (R3_OPINDEX_NOOP << 8))

Definition at line 55 of file inteng.h.

◆ ROP4_MASKPAINT

#define ROP4_MASKPAINT   (R3_OPINDEX_PATCOPY | (R3_OPINDEX_NOOP << 8))

Definition at line 56 of file inteng.h.

◆ ROP4_NOOP

#define ROP4_NOOP   (R3_OPINDEX_NOOP | (R3_OPINDEX_NOOP << 8))

Definition at line 54 of file inteng.h.

◆ ROP4_USES_DEST

#define ROP4_USES_DEST (   Rop4)    ((((Rop4) & 0xAAAA) >> 1) != ((Rop4) & 0x5555))

Definition at line 44 of file inteng.h.

◆ ROP4_USES_MASK

#define ROP4_USES_MASK (   Rop4)    ((((Rop4) & 0xFF00) >> 8) != ((Rop4) & 0x00ff))

Definition at line 47 of file inteng.h.

◆ ROP4_USES_PATTERN

#define ROP4_USES_PATTERN (   Rop4)    ((((Rop4) & 0xF0F0) >> 4) != ((Rop4) & 0x0F0F))

Definition at line 46 of file inteng.h.

◆ ROP4_USES_SOURCE

#define ROP4_USES_SOURCE (   Rop4)    ((((Rop4) & 0xCCCC) >> 2) != ((Rop4) & 0x3333))

Definition at line 45 of file inteng.h.

Typedef Documentation

◆ HCLIP

typedef ULONG HCLIP

Definition at line 3 of file inteng.h.

◆ PSPAN

typedef struct tagSPAN * PSPAN

◆ RECT_ENUM

◆ SPAN

typedef struct tagSPAN SPAN

Enumeration Type Documentation

◆ _R3_ROPCODES

Enumerator
R3_OPINDEX_NOOP 
R3_OPINDEX_BLACKNESS 
R3_OPINDEX_NOTSRCERASE 
R3_OPINDEX_NOTSRCCOPY 
R3_OPINDEX_SRCERASE 
R3_OPINDEX_DSTINVERT 
R3_OPINDEX_PATINVERT 
R3_OPINDEX_SRCINVERT 
R3_OPINDEX_SRCAND 
R3_OPINDEX_MERGEPAINT 
R3_OPINDEX_MERGECOPY 
R3_OPINDEX_SRCCOPY 
R3_OPINDEX_SRCPAINT 
R3_OPINDEX_PATCOPY 
R3_OPINDEX_PATPAINT 
R3_OPINDEX_WHITENESS 

Definition at line 20 of file inteng.h.

21{
22 R3_OPINDEX_NOOP = 0xAA,
30 R3_OPINDEX_SRCAND = 0x88,
33 R3_OPINDEX_SRCCOPY = 0xCC,
35 R3_OPINDEX_PATCOPY = 0xF0,
38};
@ R3_OPINDEX_SRCCOPY
Definition: inteng.h:33
@ R3_OPINDEX_PATINVERT
Definition: inteng.h:28
@ R3_OPINDEX_MERGEPAINT
Definition: inteng.h:31
@ R3_OPINDEX_NOTSRCCOPY
Definition: inteng.h:25
@ R3_OPINDEX_WHITENESS
Definition: inteng.h:37
@ R3_OPINDEX_BLACKNESS
Definition: inteng.h:23
@ R3_OPINDEX_PATCOPY
Definition: inteng.h:35
@ R3_OPINDEX_SRCPAINT
Definition: inteng.h:34
@ R3_OPINDEX_DSTINVERT
Definition: inteng.h:27
@ R3_OPINDEX_SRCERASE
Definition: inteng.h:26
@ R3_OPINDEX_MERGECOPY
Definition: inteng.h:32
@ R3_OPINDEX_NOOP
Definition: inteng.h:22
@ R3_OPINDEX_SRCAND
Definition: inteng.h:30
@ R3_OPINDEX_NOTSRCERASE
Definition: inteng.h:24
@ R3_OPINDEX_SRCINVERT
Definition: inteng.h:29
@ R3_OPINDEX_PATPAINT
Definition: inteng.h:36

Function Documentation

◆ IntEngAlphaBlend()

BOOL APIENTRY IntEngAlphaBlend ( _Inout_ SURFOBJ psoDest,
_In_ SURFOBJ psoSource,
_In_opt_ CLIPOBJ pco,
_In_opt_ XLATEOBJ pxlo,
_In_ RECTL prclDest,
_In_ RECTL prclSrc,
_In_ BLENDOBJ pBlendObj 
)

Definition at line 198 of file alphablend.c.

206{
207 BOOL ret = FALSE;
208 SURFACE *psurfDest;
209
210 ASSERT(psoDest);
211 ASSERT(psoSource);
214 //ASSERT(pBlendObj);
215
216 /* If no clip object is given, use trivial one */
217 if (!pco) pco = (CLIPOBJ *)&gxcoTrivial;
218
219 /* Check if there is anything to draw */
220 if ((pco->rclBounds.left >= pco->rclBounds.right) ||
221 (pco->rclBounds.top >= pco->rclBounds.bottom))
222 {
223 /* Nothing to do */
224 return TRUE;
225 }
226
227 psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
228
229 /* Call the driver's DrvAlphaBlend if available */
230 if (psurfDest->flags & HOOK_ALPHABLEND)
231 {
232 ret = GDIDEVFUNCS(psoDest).AlphaBlend(
233 psoDest, psoSource, pco, pxlo,
235 }
236
237 if (!ret)
238 {
239 ret = EngAlphaBlend(psoDest, psoSource, pco, pxlo,
241 }
242
243 return ret;
244}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ASSERT(a)
Definition: mode.c:44
FLONG flags
Definition: surface.h:10
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
int ret
BOOL APIENTRY EngAlphaBlend(_Inout_ SURFOBJ *psoDest, _In_ SURFOBJ *psoSource, _In_opt_ CLIPOBJ *ClipRegion, _In_opt_ XLATEOBJ *ColorTranslation, _In_ RECTL *DestRect, _In_ RECTL *SourceRect, _In_ BLENDOBJ *BlendObj)
Definition: alphablend.c:20
XCLIPOBJ gxcoTrivial
Definition: bitblt.c:20
#define GDIDEVFUNCS(SurfObj)
Definition: surface.h:106
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL * prclSrc
Definition: winddi.h:3418
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ * pxlo
Definition: winddi.h:3416
#define HOOK_ALPHABLEND
Definition: winddi.h:1435
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL _In_ BLENDOBJ * pBlendObj
Definition: winddi.h:3419
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDest
Definition: winddi.h:3417
_In_ SURFOBJ _In_ CLIPOBJ * pco
Definition: winddi.h:3415

Referenced by IntShowMousePointer(), NtGdiAlphaBlend(), and UserDrawIconEx().

◆ IntEngBitBlt()

BOOL APIENTRY IntEngBitBlt ( SURFOBJ DestObj,
SURFOBJ SourceObj,
SURFOBJ Mask,
CLIPOBJ ClipRegion,
XLATEOBJ ColorTranslation,
RECTL DestRect,
POINTL SourcePoint,
POINTL MaskOrigin,
BRUSHOBJ Brush,
POINTL BrushOrigin,
ROP4  Rop4 
)

Definition at line 656 of file bitblt.c.

668{
669 SURFACE *psurfTrg;
670 SURFACE *psurfSrc = NULL;
671 BOOL bResult;
672 RECTL rclClipped;
673 RECTL rclSrc;
674 RECTL rclSrcClipped;
675 POINTL ptlBrush;
676 PFN_DrvBitBlt pfnBitBlt;
677 LONG lTmp;
678 BOOLEAN bTopToBottom, bLeftToRight;
679
680 /* Sanity checks */
681 ASSERT(IS_VALID_ROP4(Rop4));
682 ASSERT(psoTrg);
683
684 psurfTrg = CONTAINING_RECORD(psoTrg, SURFACE, SurfObj);
685
686 bLeftToRight = prclTrg->left > prclTrg->right;
687 bTopToBottom = prclTrg->top > prclTrg->bottom;
688
689 /* Get the target rect and make it well ordered */
690 rclClipped = *prclTrg;
691 RECTL_vMakeWellOrdered(&rclClipped);
692
693 /* Clip the target rect against the bounds of the target surface */
694 if (!RECTL_bClipRectBySize(&rclClipped, &rclClipped, &psoTrg->sizlBitmap))
695 {
696 /* Nothing left */
697 return TRUE;
698 }
699
700 if (pco)
701 {
702 /* Clip target rect against the bounds of the clipping region */
703 if (!RECTL_bIntersectRect(&rclClipped, &rclClipped, &pco->rclBounds))
704 {
705 /* Nothing left */
706 return TRUE;
707 }
708
709 /* Don't pass a clipobj with only a single rect */
710 if (pco->iDComplexity == DC_RECT)
711 pco = NULL;
712 }
713 else
714 pco = (CLIPOBJ *)&gxcoTrivial;
715
716 if (ROP4_USES_SOURCE(Rop4))
717 {
718 ASSERT(psoSrc);
719 psurfSrc = CONTAINING_RECORD(psoSrc, SURFACE, SurfObj);
720
721 /* Calculate source rect */
722 rclSrc.left = pptlSrc->x + rclClipped.left - prclTrg->left;
723 rclSrc.top = pptlSrc->y + rclClipped.top - prclTrg->top;
724 rclSrc.right = rclSrc.left + rclClipped.right - rclClipped.left;
725 rclSrc.bottom = rclSrc.top + rclClipped.bottom - rclClipped.top;
726
727 /* Clip the source rect against the size of the source surface */
728 if (!RECTL_bClipRectBySize(&rclSrcClipped, &rclSrc, &psoSrc->sizlBitmap))
729 {
730 /* Nothing left */
731 return TRUE;
732 }
733
734 /* Fix up target rect */
735 rclClipped.left += (rclSrcClipped.left - rclSrc.left);
736 rclClipped.top += (rclSrcClipped.top - rclSrc.top);
737 rclClipped.right -= (rclSrc.right - rclSrcClipped.right);
738 rclClipped.bottom -= (rclSrc.bottom - rclSrcClipped.bottom);
739
740 pptlSrc = (PPOINTL)&rclSrcClipped;
741 }
742 else
743 {
744 psoSrc = NULL;
745 psurfSrc = NULL;
746 }
747
748 if (pptlBrush)
749 {
750#ifdef _USE_DIBLIB_
751 ptlBrush.x = pptlBrush->x + rclClipped.left - prclTrg->left;
752 ptlBrush.y = pptlBrush->y + rclClipped.top - prclTrg->top;
753#else
754 ptlBrush = *pptlBrush;
755#endif
756 }
757
758 /* Is the target surface device managed? */
759 if (psurfTrg->flags & HOOK_BITBLT)
760 {
761 /* Is the source a different device managed surface? */
762 if (psoSrc && psoSrc->hdev != psoTrg->hdev && psurfSrc->flags & HOOK_BITBLT)
763 {
764 DPRINT1("Need to copy to standard bitmap format!\n");
765 ASSERT(FALSE);
766 }
767
768 pfnBitBlt = GDIDEVFUNCS(psoTrg).BitBlt;
769 }
770
771 /* Is the source surface device managed? */
772 else if (psoSrc && psurfSrc->flags & HOOK_BITBLT)
773 {
774 pfnBitBlt = GDIDEVFUNCS(psoSrc).BitBlt;
775 }
776 else
777 {
778 pfnBitBlt = EngBitBlt;
779 }
780
781 /* rclClipped needs to be modified in accordance with flips here */
782 if (bLeftToRight)
783 {
784 lTmp = rclClipped.left;
785 rclClipped.left = rclClipped.right;
786 rclClipped.right = lTmp;
787 }
788
789 if (bTopToBottom)
790 {
791 lTmp = rclClipped.top;
792 rclClipped.top = rclClipped.bottom;
793 rclClipped.bottom = lTmp;
794 }
795
796 DPRINT("About to call EngBitBlt: rclClipped: (%d,%d)-(%d,%d)\n",
797 rclClipped.left, rclClipped.top, rclClipped.right, rclClipped.bottom);
798
799 bResult = pfnBitBlt(psoTrg,
800 psoSrc,
801 psoMask,
802 pco,
803 pxlo,
804 &rclClipped,
805 pptlSrc,
806 pptlMask,
807 pbo,
808 pptlBrush ? &ptlBrush : NULL,
809 Rop4);
810
811 // FIXME: cleanup temp surface!
812
813 return bResult;
814}
unsigned char BOOLEAN
#define DPRINT1
Definition: precomp.h:8
#define NULL
Definition: types.h:112
#define IS_VALID_ROP4(rop)
Definition: inteng.h:49
#define ROP4_USES_SOURCE(Rop4)
Definition: inteng.h:45
long LONG
Definition: pedump.c:60
#define DPRINT
Definition: sndvol32.h:73
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
BOOL APIENTRY EngBitBlt(_Inout_ SURFOBJ *psoTrg, _In_opt_ SURFOBJ *psoSrc, _In_opt_ SURFOBJ *psoMask, _In_opt_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ RECTL *prclTrg, _In_opt_ POINTL *pptlSrc, _In_opt_ POINTL *pptlMask, _In_opt_ BRUSHOBJ *pbo, _In_opt_ POINTL *pptlBrush, _In_ ROP4 rop4)
Definition: bitblt.c:328
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
Definition: rect.c:81
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
Definition: rect.c:55
FORCEINLINE BOOL RECTL_bClipRectBySize(_Out_ RECTL *prclDst, _In_ const RECTL *prclSrc, _In_ const SIZEL *pszl)
Definition: rect.h:72
FN_DrvBitBlt * PFN_DrvBitBlt
Definition: winddi.h:3443
_In_ SURFOBJ * psoSrc
Definition: winddi.h:3414
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclTrg
Definition: winddi.h:3437
_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 * pptlBrush
Definition: winddi.h:3441
_In_opt_ SURFOBJ _In_opt_ SURFOBJ * psoMask
Definition: winddi.h:3434
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL * pptlSrc
Definition: winddi.h:3438
#define DC_RECT
Definition: winddi.h:260
#define HOOK_BITBLT
Definition: winddi.h:1420
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL _In_opt_ BRUSHOBJ * pbo
Definition: winddi.h:3440
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL * pptlMask
Definition: winddi.h:3439
struct _POINTL * PPOINTL

Referenced by EngCopyBits(), EngPaint(), IntEngFillBox(), IntEngMaskBlt(), IntEngStretchBlt(), IntFillPolygon(), IntFillRect(), IntGdiBitBltRgn(), IntHideMousePointer(), IntPatBlt(), IntRectangle(), IntShowMousePointer(), NtGdiMaskBlt(), NtGdiSetDIBitsToDeviceInternal(), and UserDrawIconEx().

◆ IntEngCopyBits()

BOOL APIENTRY IntEngCopyBits ( SURFOBJ psoDest,
SURFOBJ psoSource,
CLIPOBJ pco,
XLATEOBJ pxlo,
RECTL prclDest,
POINTL ptlSource 
)

Definition at line 678 of file bitblt_new.c.

685{
686 return EngCopyBits(psoTrg, psoSrc, pco, pxlo, prclTrg, pptlSrc);
687}
BOOL APIENTRY EngCopyBits(SURFOBJ *psoTrg, SURFOBJ *psoSrc, CLIPOBJ *pco, XLATEOBJ *pxlo, RECTL *prclTrg, POINTL *pptlSrc)
Definition: bitblt_new.c:637

Referenced by EngSetPointerShape(), GreGetDIBitsInternal(), and IntSetDIBits().

◆ IntEngFreeClipResources()

VOID FASTCALL IntEngFreeClipResources ( XCLIPOBJ Clip)

Definition at line 164 of file clip.c.

165{
166 if (Clip->Rects != &Clip->rclBounds)
167 EngFreeMem(Clip->Rects);
168}
#define EngFreeMem
Definition: polytest.cpp:56
RECTL * Rects
Definition: engobjects.h:65

Referenced by DC_vCleanup(), EngDeleteClip(), EngDeleteWnd(), IntGdiBitBltRgn(), and IntGdiFillRgn().

◆ IntEngGradientFill()

BOOL APIENTRY IntEngGradientFill ( SURFOBJ psoDest,
CLIPOBJ pco,
XLATEOBJ pxlo,
TRIVERTEX pVertex,
ULONG  nVertex,
PVOID  pMesh,
ULONG  nMesh,
RECTL prclExtents,
POINTL pptlDitherOrg,
ULONG  ulMode 
)

◆ IntEngInitClipObj()

VOID FASTCALL IntEngInitClipObj ( XCLIPOBJ Clip)

Definition at line 158 of file clip.c.

159{
160 Clip->Rects = &Clip->rclBounds;
161}

Referenced by DC_vInitDc(), EngCreateClip(), EngCreateWnd(), IntGdiBitBltRgn(), and IntGdiFillRgn().

◆ IntEngLineTo()

BOOL APIENTRY IntEngLineTo ( SURFOBJ Surface,
CLIPOBJ Clip,
BRUSHOBJ Brush,
LONG  x1,
LONG  y1,
LONG  x2,
LONG  y2,
RECTL RectBounds,
MIX  mix 
)

Definition at line 621 of file lineto.c.

630{
631 BOOLEAN ret;
632 SURFACE *psurfDest;
633 PEBRUSHOBJ GdiBrush;
634 RECTL b;
635
636 ASSERT(psoDest);
637 psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
638 ASSERT(psurfDest);
639
640 GdiBrush = CONTAINING_RECORD(
641 pbo,
642 EBRUSHOBJ,
643 BrushObject);
644 ASSERT(GdiBrush);
645 ASSERT(GdiBrush->pbrush);
646
647 if (GdiBrush->pbrush->flAttrs & BR_IS_NULL)
648 return TRUE;
649
650 /* No success yet */
651 ret = FALSE;
652
653 /* Clip lines totally outside the clip region. This is not done as an
654 * optimization (there are very few lines drawn outside the region) but
655 * as a workaround for what seems to be a problem in the CL54XX driver */
656 if (NULL == ClipObj || DC_TRIVIAL == ClipObj->iDComplexity)
657 {
658 b.left = 0;
659 b.right = psoDest->sizlBitmap.cx;
660 b.top = 0;
661 b.bottom = psoDest->sizlBitmap.cy;
662 }
663 else
664 {
665 b = ClipObj->rclBounds;
666 }
667 if ((x1 < b.left && x2 < b.left) || (b.right <= x1 && b.right <= x2) ||
668 (y1 < b.top && y2 < b.top) || (b.bottom <= y1 && b.bottom <= y2))
669 {
670 return TRUE;
671 }
672
673 b.left = min(x1, x2);
674 b.right = max(x1, x2);
675 b.top = min(y1, y2);
676 b.bottom = max(y1, y2);
677 if (b.left == b.right) b.right++;
678 if (b.top == b.bottom) b.bottom++;
679
680 if (psurfDest->flags & HOOK_LINETO)
681 {
682 /* Call the driver's DrvLineTo */
683 ret = GDIDEVFUNCS(psoDest).LineTo(
684 psoDest, ClipObj, pbo, x1, y1, x2, y2, &b, Mix);
685 }
686
687#if 0
688 if (! ret && (psurfDest->flags & HOOK_STROKEPATH))
689 {
690 /* FIXME: Emulate LineTo using drivers DrvStrokePath and set ret on success */
691 }
692#endif
693
694 if (! ret)
695 {
696 ret = EngLineTo(psoDest, ClipObj, pbo, x1, y1, x2, y2, RectBounds, Mix);
697 }
698
699 return ret;
700}
BOOL APIENTRY EngLineTo(_Inout_ SURFOBJ *DestObj, _In_ CLIPOBJ *Clip, _In_ BRUSHOBJ *pbo, _In_ LONG x1, _In_ LONG y1, _In_ LONG x2, _In_ LONG y2, _In_opt_ RECTL *RectBounds, _In_ MIX mix)
Definition: lineto.c:440
#define BR_IS_NULL
Definition: brush.h:105
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define b
Definition: ke_i.h:79
#define min(a, b)
Definition: monoChain.cc:55
PBRUSH pbrush
Definition: brush.h:88
#define max(a, b)
Definition: svc.c:63
#define DC_TRIVIAL
Definition: winddi.h:259
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3709
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3711
#define HOOK_LINETO
Definition: winddi.h:1428
#define HOOK_STROKEPATH
Definition: winddi.h:1425

Referenced by IntEngPolyline().

◆ IntEngPaint()

BOOL APIENTRY IntEngPaint ( _In_ SURFOBJ pso,
_In_ CLIPOBJ pco,
_In_ BRUSHOBJ pbo,
_In_ POINTL pptlBrushOrg,
_In_ __in_data_source(USER_MODE) MIX  mix 
)

Definition at line 85 of file paint.c.

91{
92 SURFACE *psurf = CONTAINING_RECORD(pso, SURFACE, SurfObj);
93
94 /* Is the surface's Paint function hooked? */
95 if ((pso->iType != STYPE_BITMAP) && (psurf->flags & HOOK_PAINT))
96 {
97 /* Call the driver's DrvPaint */
98 return GDIDEVFUNCS(pso).Paint(pso, pco, pbo, pptlBrushOrg, mix);
99 }
100
101 return EngPaint(pso, pco, pbo, pptlBrushOrg, mix);
102}
BOOL APIENTRY EngPaint(_In_ SURFOBJ *pso, _In_ CLIPOBJ *pco, _In_ BRUSHOBJ *pbo, _In_ POINTL *pptlBrushOrg, _In_ __in_data_source(USER_MODE) MIX mix)
Definition: paint.c:54
#define STYPE_BITMAP
Definition: winddi.h:1175
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL _In_ MIX mix
Definition: winddi.h:3595
_In_ HANDLE _In_ SURFOBJ * pso
Definition: winddi.h:3665
#define HOOK_PAINT
Definition: winddi.h:1424
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL * pptlBrushOrg
Definition: winddi.h:3594

Referenced by IntGdiFillRgn().

◆ IntEngPolyline()

BOOL APIENTRY IntEngPolyline ( SURFOBJ DestSurf,
CLIPOBJ Clip,
BRUSHOBJ Brush,
CONST LPPOINT  pt,
LONG  dCount,
MIX  mix 
)

Definition at line 703 of file lineto.c.

709{
710 LONG i;
711 RECTL rect;
712 BOOL ret = FALSE;
713
714 // Draw the Polyline with a call to IntEngLineTo for each segment.
715 for (i = 1; i < dCount; i++)
716 {
717 rect.left = min(pt[i-1].x, pt[i].x);
718 rect.top = min(pt[i-1].y, pt[i].y);
719 rect.right = max(pt[i-1].x, pt[i].x);
720 rect.bottom = max(pt[i-1].y, pt[i].y);
721 ret = IntEngLineTo(psoDest,
722 Clip,
723 pbo,
724 pt[i-1].x,
725 pt[i-1].y,
726 pt[i].x,
727 pt[i].y,
728 &rect,
729 Mix);
730 if (!ret)
731 {
732 break;
733 }
734 }
735
736 return ret;
737}
#define pt(x, y)
Definition: drawing.c:79
BOOL APIENTRY IntEngLineTo(SURFOBJ *psoDest, CLIPOBJ *ClipObj, BRUSHOBJ *pbo, LONG x1, LONG y1, LONG x2, LONG y2, RECTL *RectBounds, MIX Mix)
Definition: lineto.c:621
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
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
Definition: glfuncs.h:248
& rect
Definition: startmenu.cpp:1413

Referenced by IntGdiPolyline().

◆ IntEngStretchBlt()

BOOL APIENTRY IntEngStretchBlt ( SURFOBJ DestObj,
SURFOBJ SourceObj,
SURFOBJ Mask,
CLIPOBJ ClipRegion,
XLATEOBJ ColorTranslation,
COLORADJUSTMENT pca,
RECTL DestRect,
RECTL SourceRect,
POINTL pMaskOrigin,
BRUSHOBJ Brush,
POINTL BrushOrigin,
ULONG  Mode 
)

◆ IntEngTransparentBlt()

BOOL FASTCALL IntEngTransparentBlt ( SURFOBJ Dest,
SURFOBJ Source,
CLIPOBJ Clip,
XLATEOBJ ColorTranslation,
PRECTL  DestRect,
PRECTL  SourceRect,
ULONG  iTransColor,
ULONG  Reserved 
)

Definition at line 207 of file transblt.c.

216{
217 BOOL Ret;
218 RECTL OutputRect, InputClippedRect;
219 SURFACE *psurfDest;
220 SURFACE *psurfSource;
221 RECTL InputRect;
222 LONG InputClWidth, InputClHeight, InputWidth, InputHeight;
223
224 ASSERT(psoDest);
225 ASSERT(psoSource);
226 ASSERT(DestRect);
227
228 psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
229 psurfSource = CONTAINING_RECORD(psoSource, SURFACE, SurfObj);
230
231 ASSERT(psurfDest);
232 ASSERT(psurfSource);
233
234 /* If no clip object is given, use trivial one */
235 if (!Clip) Clip = (CLIPOBJ *)&gxcoTrivial;
236
237 InputClippedRect = *DestRect;
238 if (InputClippedRect.right < InputClippedRect.left)
239 {
240 InputClippedRect.left = DestRect->right;
241 InputClippedRect.right = DestRect->left;
242 }
243 if (InputClippedRect.bottom < InputClippedRect.top)
244 {
245 InputClippedRect.top = DestRect->bottom;
246 InputClippedRect.bottom = DestRect->top;
247 }
248
249 InputRect = *SourceRect;
250 /* Clip against the bounds of the clipping region so we won't try to write
251 * outside the surface */
252 if (Clip->iDComplexity != DC_TRIVIAL)
253 {
254 if (!RECTL_bIntersectRect(&OutputRect, &InputClippedRect, &Clip->rclBounds))
255 {
256 return TRUE;
257 }
258 /* Update source rect */
259 InputClWidth = InputClippedRect.right - InputClippedRect.left;
260 InputClHeight = InputClippedRect.bottom - InputClippedRect.top;
261 InputWidth = InputRect.right - InputRect.left;
262 InputHeight = InputRect.bottom - InputRect.top;
263
264 InputRect.left += (InputWidth * (OutputRect.left - InputClippedRect.left)) / InputClWidth;
265 InputRect.right -= (InputWidth * (InputClippedRect.right - OutputRect.right)) / InputClWidth;
266 InputRect.top += (InputHeight * (OutputRect.top - InputClippedRect.top)) / InputClHeight;
267 InputRect.bottom -= (InputHeight * (InputClippedRect.bottom - OutputRect.bottom)) / InputClHeight;
268 }
269 else
270 {
271 OutputRect = InputClippedRect;
272 }
273
274 if (psurfDest->flags & HOOK_TRANSPARENTBLT)
275 {
276 Ret = GDIDEVFUNCS(psoDest).TransparentBlt(psoDest,
277 psoSource,
278 Clip,
279 ColorTranslation,
280 &OutputRect,
281 &InputRect,
283 Reserved);
284 }
285 else
286 Ret = FALSE;
287
288 if (!Ret)
289 {
290 Ret = EngTransparentBlt(psoDest,
291 psoSource,
292 Clip,
293 ColorTranslation,
294 &OutputRect,
295 &InputRect,
297 Reserved);
298 }
299
300 return Ret;
301}
BOOL APIENTRY EngTransparentBlt(SURFOBJ *psoDest, SURFOBJ *psoSource, CLIPOBJ *Clip, XLATEOBJ *ColorTranslation, PRECTL DestRect, PRECTL SourceRect, ULONG iTransColor, ULONG Reserved)
Definition: transblt.c:16
BYTE iDComplexity
Definition: winddi.h:278
RECTL rclBounds
Definition: winddi.h:277
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL _In_ ULONG iTransColor
Definition: winddi.h:4195
#define HOOK_TRANSPARENTBLT
Definition: winddi.h:1434
_Reserved_ PVOID Reserved
Definition: winddi.h:3974

Referenced by NtGdiTransparentBlt().

◆ IntEngUpdateClipRegion()

VOID FASTCALL IntEngUpdateClipRegion ( XCLIPOBJ Clip,
ULONG  count,
const RECTL pRect,
const RECTL rcBounds 
)

Definition at line 173 of file clip.c.

178{
179 if(count > 1)
180 {
182
183 if(NewRects != NULL)
184 {
185 Clip->RectCount = count;
186 Clip->iDirection = CD_ANY;
187 RtlCopyMemory(NewRects, pRect, count * sizeof(RECTL));
188
189 Clip->iDComplexity = DC_COMPLEX;
190 Clip->iFComplexity = ((Clip->RectCount <= 4) ? FC_RECT4 : FC_COMPLEX);
191 Clip->iMode = TC_RECTANGLES;
192 Clip->rclBounds = *rcBounds;
193
194 if (Clip->Rects != &Clip->rclBounds)
195 EngFreeMem(Clip->Rects);
196 Clip->Rects = NewRects;
197 }
198 }
199 else
200 {
201 Clip->iDirection = CD_ANY;
202
203 Clip->iDComplexity = (((rcBounds->top == rcBounds->bottom) &&
204 (rcBounds->left == rcBounds->right))
205 ? DC_TRIVIAL : DC_RECT);
206
207 Clip->iFComplexity = FC_RECT;
208 Clip->iMode = TC_RECTANGLES;
209 Clip->rclBounds = *rcBounds;
210 Clip->RectCount = 1;
211 if (Clip->Rects != &Clip->rclBounds)
212 EngFreeMem(Clip->Rects);
213 Clip->Rects = &Clip->rclBounds;
214 }
215}
GLuint GLuint GLsizei count
Definition: gl.h:1545
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
ULONG iDirection
Definition: engobjects.h:71
DWORD RectCount
Definition: engobjects.h:78
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define GDITAG_CLIPOBJ
Definition: tags.h:78
#define FC_RECT4
Definition: winddi.h:265
#define FC_COMPLEX
Definition: winddi.h:266
#define DC_COMPLEX
Definition: winddi.h:261
#define CD_ANY
Definition: winddi.h:1326
#define FC_RECT
Definition: winddi.h:264
#define TC_RECTANGLES
Definition: winddi.h:269

Referenced by CLIPPING_UpdateGCRegion(), EngLineTo(), IntEngWndUpdateClipObj(), IntGdiBitBltRgn(), and IntGdiFillRgn().