2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: GDI Driver Paint Functions
5 * FILE: win32ss/gdi/eng/paint.c
6 * PROGRAMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
15 const BYTE gajRop2ToRop3
[16] =
17 0x00, // 1: R2_BLACK 0
18 0x05, // 2: R2_NOTMERGEPEN DPon
19 0x0A, // 3: R2_MASKNOTPEN DPna
20 0x0F, // 4: R2_NOTCOPYPEN Pn
21 0x50, // 5: R2_MASKPENNOT PDna
23 0x5A, // 7: R2_XORPEN DPx
24 0x5F, // 8: R2_NOTMASKPEN DPan
25 0xA0, // 9: R2_MASKPEN DPa
26 0xA5, // 10: R2_NOTXORPEN PDxn
28 0xAF, // 12: R2_MERGENOTPEN DPno
29 0xF0, // 13: R2_COPYPEN P
30 0xF5, // 14: R2_MERGEPENNOT PDno
31 0xFA, // 15: R2_MERGEPEN DPo
32 0xFF, // 16: R2_WHITE 1
35 BOOL APIENTRY
FillSolid(SURFOBJ
*pso
, PRECTL pRect
, ULONG iColor
)
42 LineWidth
= pRect
->right
- pRect
->left
;
43 DPRINT(" LineWidth: %lu, top: %ld, bottom: %ld\n", LineWidth
, pRect
->top
, pRect
->bottom
);
44 for (y
= pRect
->top
; y
< pRect
->bottom
; y
++)
46 DibFunctionsForBitmapFormat
[pso
->iBitmapFormat
].DIB_HLine(
47 pso
, pRect
->left
, pRect
->right
, y
, iColor
);
58 _In_ POINTL
*pptlBrushOrg
,
59 _In_
__in_data_source(USER_MODE
) MIX mix
)
63 /* Convert the MIX, consisting of 2 ROP2 codes into a ROP4 */
64 rop4
= MIX_TO_ROP4(mix
);
67 NT_ASSERT(!ROP4_USES_SOURCE(rop4
));
69 /* Forward the call to Eng/DrvBitBlt */
70 return IntEngBitBlt(pso
,
89 _In_ POINTL
*pptlBrushOrg
,
90 _In_
__in_data_source(USER_MODE
) MIX mix
)
92 SURFACE
*psurf
= CONTAINING_RECORD(pso
, SURFACE
, SurfObj
);
94 /* Is the surface's Paint function hooked? */
95 if ((pso
->iType
!= STYPE_BITMAP
) && (psurf
->flags
& HOOK_PAINT
))
97 /* Call the driver's DrvPaint */
98 return GDIDEVFUNCS(pso
).Paint(pso
, pco
, pbo
, pptlBrushOrg
, mix
);
101 return EngPaint(pso
, pco
, pbo
, pptlBrushOrg
, mix
);