275#define ALPHABLEND_NONE 0
276#define ALPHABLEND_BINARY 1
277#define ALPHABLEND_FULL 2
292#define TransparentBlt GdiTransparentBlt
293#define AlphaBlend GdiAlphaBlend
301 HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
int nWidthSrc,
int nHeightSrc,
313 int old_stretch_mode;
322 hdcSrc, nXOriginSrc, nYOriginSrc,
abs(nWidthSrc),
abs(nHeightSrc),
326 hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc,
330 hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc,
345static inline BOOL UXTHEME_Blt(
HDC hdcDest,
int nXOriginDest,
int nYOriginDest,
int nWidthDest,
int nHeightDest,
346 HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
349 return UXTHEME_StretchBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest,
350 hdcSrc, nXOriginSrc, nYOriginSrc, nWidthDest, nHeightDest,
351 transparent, transcolor);
360 int nWidthDst,
int nHeightDst,
361 HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
362 int nWidthSrc,
int nHeightSrc,
371 if (!nWidthSrc || !nHeightSrc)
return TRUE;
375 if (nWidthSrc >= nWidthDst && nHeightSrc >= nHeightDst)
377 int bltWidth =
min (nWidthDst, nWidthSrc);
378 int bltHeight =
min (nHeightDst, nHeightSrc);
381 hdcSrc, nXOriginSrc, nYOriginSrc,
382 transparent, transcolor);
393 int nWidthTemp, nHeightTemp;
394 int xOfs, xRemaining;
395 int yOfs, yRemaining;
399 nWidthTemp = ((nWidthDst + nWidthSrc - 1) / nWidthSrc) * nWidthSrc;
400 nHeightTemp = ((nHeightDst + nHeightSrc - 1) / nHeightSrc) * nHeightSrc;
409 xRemaining = nWidthTemp - nWidthSrc;
410 growSize = nWidthSrc;
411 while (xRemaining > 0)
413 growSize =
min(growSize, xRemaining);
414 BitBlt(hdcTemp, xOfs, 0, growSize, nHeightSrc, hdcTemp, 0, 0,
SRCCOPY);
416 xRemaining -= growSize;
422 yRemaining = nHeightTemp - nHeightSrc;
423 growSize = nHeightSrc;
424 while (yRemaining > 0)
426 growSize =
min(growSize, yRemaining);
427 BitBlt(hdcTemp, 0, yOfs, nWidthTemp, growSize, hdcTemp, 0, 0,
SRCCOPY);
429 yRemaining -= growSize;
436 transparent, transcolor);
447 hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc,
448 transparent, transcolor);
489 transparent, transparentcolor))
496 dstSize.
x =
abs(dstSize.
x);
497 dstSize.
y =
abs(dstSize.
y);
507 srcSize.
y = dstSize.
y;
513 srcSize.
x = dstSize.
x;
537 transparent, transparentcolor)) {
545 transparent, transparentcolor)) {
553 transparent, transparentcolor)) {
561 transparent, transparentcolor)) {
572 if(destCenterWidth > 0) {
578 sizingtype, transparent, transparentcolor)) {
587 sizingtype, transparent, transparentcolor)) {
592 if(destCenterHeight > 0) {
599 transparent, transparentcolor)) {
608 sizingtype, transparent, transparentcolor)) {
613 if(destCenterHeight > 0 && destCenterWidth > 0) {
617 destCenterWidth, destCenterHeight,
619 srcCenterWidth, srcCenterHeight,
620 sizingtype, transparent, transparentcolor)) {
634 if (hdcOrigSrc)
DeleteDC(hdcOrigSrc);
646 if (!pDS ||
l !=
sizeof(*pDS))
648 DPRINT1(
"GdiDrawStream: Invalid params\n");
657 DPRINT1(
"GdiDrawStream: Got unknown pDS data\n");
797 return pdcattr->
pvLDC;
814 pdcattr->
pvLDC = pvLDC;
934 if ( pBrush_Attr->
lbColor != cr )
972 WORD dmW_size, dmA_size;
988 if (!dmW)
return NULL;
VOID WINAPI InitializeLpkHooks(PUSER32_INTERN_INITIALIZEHOOKS)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
DWORD APIENTRY NtGdiGetBoundsRect(IN HDC hdc, OUT LPRECT prc, IN DWORD flags)
#define ERROR_NOT_ENOUGH_MEMORY
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define ERROR_CALL_NOT_IMPLEMENTED
#define GetProcAddress(x, y)
#define ERROR_INVALID_HANDLE
#define MultiByteToWideChar
DWORD WINAPI GetTickCount(VOID)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
#define InterlockedExchangePointer(Target, Value)
BOOL WINAPI GetETM(HDC hdc, EXTTEXTMETRIC *petm)
BOOL METADC_ExtEscape(HDC hdc, INT escape, INT input_size, LPCSTR input, INT output_size, LPVOID output) DECLSPEC_HIDDEN
BOOL WINAPI LoadLPK(INT LpkFunctionID)
FORCEINLINE PDC_ATTR GdiGetDcAttr(HDC hdc)
#define GDI_HANDLE_GET_UPPER(h)
#define GDI_HANDLE_GET_INDEX(h)
#define GDI_OBJECT_TYPE_DC
#define GDI_HANDLE_GET_TYPE(h)
#define GDI_HANDLE_TYPE_MASK
#define GDI_OBJECT_TYPE_METADC
@ GDILoObjType_LO_BRUSH_TYPE
@ GDILoObjType_LO_METADC16_TYPE
@ GDILoObjType_LO_REGION_TYPE
@ GDILoObjType_LO_PEN_TYPE
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define InterlockedCompareExchangePointer
#define memcpy(s1, s2, n)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static PLARGE_INTEGER Time
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
_In_ ULONG _In_ ULONG Offset
__kernel_entry W32KAPI INT APIENTRY NtGdiExtEscape(_In_opt_ HDC hdc, _In_reads_opt_(cwcDriver) PWCHAR pDriver, _In_ INT cwcDriver, _In_ INT iEsc, _In_ INT cjIn, _In_reads_bytes_opt_(cjIn) LPSTR pjIn, _In_ INT cjOut, _Out_writes_bytes_opt_(cjOut) LPSTR pjOut)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiSetBoundsRect(_In_ HDC hdc, _In_ LPRECT prc, _In_ DWORD f)
__kernel_entry W32KAPI NTSTATUS APIENTRY NtGdiFlush(VOID)
__kernel_entry W32KAPI INT APIENTRY NtGdiDrawEscape(_In_ HDC hdc, _In_ INT iEsc, _In_ INT cjIn, _In_reads_bytes_opt_(cjIn) LPSTR pjIn)
#define GDI_ENTRY_BASETYPE_MASK
#define GDI_ENTRY_UPPER_SHIFT
#define CACHE_BRUSH_ENTRIES
enum _HANDLECACHETYPE HANDLECACHETYPE
#define CACHE_REGION_ENTRIES
#define CACHE_PEN_ENTRIES
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
base of all file and directory entries
HANDLE Handle[CACHE_BRUSH_ENTRIES+CACHE_PEN_ENTRIES+CACHE_REGION_ENTRIES+CACHE_LFONT_ENTRIES]
ULONG ulNumHandles[GDI_CACHED_HANDLE_TYPES]
BYTE dmFormName[CCHFORMNAME]
BYTE dmDeviceName[CCHDEVICENAME]
WCHAR dmDeviceName[CCHDEVICENAME]
WCHAR dmFormName[CCHFORMNAME]
#define FIELD_OFFSET(t, f)
#define DS_TRANSPARENTCLR
#define DS_TRANSPARENTALPHA
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
BOOL WINAPI GdiRealizationInfo(HDC hdc, PREALIZATION_INFO pri)
DWORD WINAPI GdiSetBatchLimit(DWORD Limit)
PGDI_TABLE_ENTRY GdiHandleTable
BOOL WINAPI bMakePathNameW(LPWSTR lpBuffer, LPCWSTR lpFileName, LPWSTR *lpFilePart, DWORD unknown)
VOID GdiSAPCallback(PLDC pldc)
BOOL WINAPI GdiAddGlsRecord(HDC hdc, DWORD unknown1, LPCSTR unknown2, LPRECT unknown3)
HGDIOBJ WINAPI GdiFixUpHandle(HGDIOBJ hGdiObj)
PVOID WINAPI GdiQueryTable(VOID)
BOOL WINAPI GdiDrawStream(HDC dc, ULONG l, PGDI_DRAW_STREAM pDS)
static BOOL UXTHEME_StretchBlt(HDC hdcDst, int nXOriginDst, int nYOriginDst, int nWidthDst, int nHeightDst, HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, INT transparent, COLORREF transcolor)
BOOL GdiGetHandleUserData(HGDIOBJ hGdiObj, DWORD ObjectType, PVOID *UserData)
INT WINAPI NamedEscape(HDC hdc, PWCHAR pDriver, INT iEsc, INT cjIn, LPSTR pjIn, INT cjOut, LPSTR pjOut)
BOOL WINAPI GetBoundsRectAlt(HDC hdc, LPRECT prc, UINT flags)
BOOL FASTCALL GdiSetLDC(HDC hdc, PVOID pvLDC)
INT WINAPI Escape(_In_ HDC hdc, _In_ INT nEscape, _In_ INT cbInput, _In_ LPCSTR lpvInData, _Out_ LPVOID lpvOutData)
BOOL WINAPI GdiAddGlsBounds(HDC hdc, LPRECT prc)
BOOL WINAPI SetBoundsRectAlt(HDC hdc, LPRECT prc, UINT flags)
HGDIOBJ FASTCALL hGetPEBHandle(HANDLECACHETYPE Type, COLORREF cr)
int WINAPI DrawEscape(HDC hDC, INT nEscape, INT cbInput, LPCSTR lpszInData)
PGDI_SHARED_HANDLE_TABLE GdiSharedHandleTable
struct _MARGINS * PMARGINS
static HRESULT UXTHEME_DrawImageBackground(HDC hdc, HBITMAP bmpSrc, RECT *prcSrc, INT transparent, COLORREF transparentcolor, BOOL borderonly, int sizingtype, MARGINS *psm, RECT *pRect)
VOID WINAPI GdiInitializeLanguagePack(DWORD InitParam)
static BOOL UXTHEME_Blt(HDC hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, INT transparent, COLORREF transcolor)
INT WINAPI ExtEscape(HDC hDC, int nEscape, int cbInput, LPCSTR lpszInData, int cbOutput, LPSTR lpszOutData)
VOID WINAPI GdiSetLastError(DWORD dwErrCode)
static BOOL UXTHEME_SizedBlt(HDC hdcDst, int nXOriginDst, int nYOriginDst, int nWidthDst, int nHeightDst, HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, int sizingtype, INT transparent, COLORREF transcolor)
PGDIHANDLECACHE GdiHandleCache
DEVMODEW *WINAPI GdiConvertToDevmodeW(const DEVMODEA *dmA)
PLDC FASTCALL GdiGetLDC(HDC hdc)
BOOL WINAPI GdiValidateHandle(HGDIOBJ hobj)
#define ALPHABLEND_BINARY
BOOL APIENTRY NtGdiGetRealizationInfo(IN HDC hdc, OUT PREALIZATION_INFO pri, IN HFONT hf)
DWORD WINAPI GetLastError(void)
_In_ LPCSTR _In_opt_ LPCSTR _In_ DWORD _Out_opt_ LPSTR * lpFilePart
_In_ ULONG _In_ ULONG _In_ ULONG cjOut
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
_In_ ULONG _In_ CLIPOBJ _In_ RECTL _In_ ULONG cjIn
#define ERROR_PRINT_CANCELLED
#define HRESULT_FROM_WIN32(x)
BOOL WINAPI CancelDC(_In_ HDC hdc)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
#define GETEXTENDEDTEXTMETRICS
BOOL(CALLBACK * ABORTPROC)(HDC, int)
BOOL WINAPI OffsetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI SetBrushOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
struct _DOCINFOA DOCINFOA
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI GdiFlush(void)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI EndDoc(_In_ HDC)
int WINAPI StartDocA(_In_ HDC, _In_ const DOCINFOA *)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
UINT WINAPI GetSystemPaletteEntries(_In_ HDC hdc, _In_ UINT iStart, _In_ UINT cEntries, _Out_writes_opt_(cEntries) LPPALETTEENTRY pPalEntries)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI SetAbortProc(_In_ HDC, _In_ ABORTPROC)
struct _devicemodeA DEVMODEA
BOOL WINAPI DeleteDC(_In_ HDC)
DWORD WINAPI GdiGetBatchLimit(void)
int WINAPI SetStretchBltMode(_In_ HDC, _In_ int)
INT WINAPI AbortDoc(_In_ HDC hdc)
_In_ LONG _In_ LONG Limit