ReactOS 0.4.15-dev-7887-g64a59a1
undocgdi.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GDI_DRAW_STREAM_TAG
 

Macros

#define DS_TILE   0x2
 
#define DS_TRANSPARENTALPHA   0x4
 
#define DS_TRANSPARENTCLR   0x8
 
#define DS_TRUESIZE   0x20
 

Typedefs

typedef struct GDI_DRAW_STREAM_TAG GDI_DRAW_STREAM
 
typedef struct GDI_DRAW_STREAM_TAGPGDI_DRAW_STREAM
 

Functions

BOOL WINAPI GdiDrawStream (HDC dc, ULONG l, PGDI_DRAW_STREAM pDS)
 
BOOL WINAPI GetTextExtentExPointWPri (HDC hdc, LPCWSTR lpwsz, INT cwc, INT dxMax, LPINT pcCh, LPINT pdxOut, LPSIZE psize)
 
BOOL WINAPI GetFontResourceInfoW (_In_z_ LPCWSTR lpFileName, _Inout_ DWORD *pdwBufSize, _Out_writes_to_opt_(*pdwBufSize, 1) PVOID lpBuffer, _In_ DWORD dwType)
 

Macro Definition Documentation

◆ DS_TILE

#define DS_TILE   0x2

Definition at line 9 of file undocgdi.h.

◆ DS_TRANSPARENTALPHA

#define DS_TRANSPARENTALPHA   0x4

Definition at line 10 of file undocgdi.h.

◆ DS_TRANSPARENTCLR

#define DS_TRANSPARENTCLR   0x8

Definition at line 11 of file undocgdi.h.

◆ DS_TRUESIZE

#define DS_TRUESIZE   0x20

Definition at line 12 of file undocgdi.h.

Typedef Documentation

◆ GDI_DRAW_STREAM

◆ PGDI_DRAW_STREAM

Function Documentation

◆ GdiDrawStream()

BOOL WINAPI GdiDrawStream ( HDC  dc,
ULONG  l,
PGDI_DRAW_STREAM  pDS 
)

Definition at line 644 of file misc.c.

645{
646 if (!pDS || l != sizeof(*pDS))
647 {
648 DPRINT1("GdiDrawStream: Invalid params\n");
649 return 0;
650 }
651
652 if (pDS->signature != 0x44727753 ||
653 pDS->reserved != 0 ||
654 pDS->unknown1 != 1 ||
655 pDS->unknown2 != 9)
656 {
657 DPRINT1("GdiDrawStream: Got unknown pDS data\n");
658 return 0;
659 }
660
661 {
663 INT transparent = 0;
664 int sizingtype;
665
667 transparent = ALPHABLEND_FULL;
668 else if (pDS->drawOption & DS_TRANSPARENTCLR)
669 transparent = ALPHABLEND_BINARY;
670 else
671 transparent = ALPHABLEND_NONE;
672
673 if (pDS->drawOption & DS_TILE)
674 sizingtype = ST_TILE;
675 else if (pDS->drawOption & DS_TRUESIZE)
676 sizingtype = ST_TRUESIZE;
677 else
678 sizingtype = ST_STRETCH;
679
680 if (pDS->rcDest.right < pDS->rcDest.left || pDS->rcDest.bottom < pDS->rcDest.top)
681 return 0;
682
683 if (sm.cxLeftWidth + sm.cxRightWidth > pDS->rcDest.right - pDS->rcDest.left)
684 {
685 sm.cxLeftWidth = sm.cxRightWidth = 0;
686 }
687
688 if (sm.cyTopHeight + sm.cyBottomHeight > pDS->rcDest.bottom - pDS->rcDest.top)
689 {
690 sm.cyTopHeight = sm.cyBottomHeight = 0;
691 }
692
694 pDS->hImage,
695 &pDS->rcSrc,
696 transparent,
697 pDS->crTransparent,
698 FALSE,
699 sizingtype,
700 &sm,
701 &pDS->rcDest);
702 }
703 return 0;
704}
#define DPRINT1
Definition: precomp.h:8
r l[0]
Definition: byte_order.h:168
#define FALSE
Definition: types.h:117
DWORD leftSizingMargin
Definition: undocgdi.h:26
DWORD rightSizingMargin
Definition: undocgdi.h:27
DWORD topSizingMargin
Definition: undocgdi.h:28
DWORD bottomSizingMargin
Definition: undocgdi.h:29
Definition: misc.c:279
int cyBottomHeight
Definition: misc.c:283
int cyTopHeight
Definition: misc.c:282
int cxRightWidth
Definition: misc.c:281
int cxLeftWidth
Definition: misc.c:280
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
int32_t INT
Definition: typedefs.h:58
#define DS_TRUESIZE
Definition: undocgdi.h:12
#define DS_TRANSPARENTCLR
Definition: undocgdi.h:11
#define DS_TRANSPARENTALPHA
Definition: undocgdi.h:10
#define DS_TILE
Definition: undocgdi.h:9
#define ALPHABLEND_FULL
Definition: misc.c:277
@ ST_TILE
Definition: misc.c:289
@ ST_TRUESIZE
Definition: misc.c:287
@ ST_STRETCH
Definition: misc.c:288
static HRESULT UXTHEME_DrawImageBackground(HDC hdc, HBITMAP bmpSrc, RECT *prcSrc, INT transparent, COLORREF transparentcolor, BOOL borderonly, int sizingtype, MARGINS *psm, RECT *pRect)
Definition: misc.c:457
#define ALPHABLEND_NONE
Definition: misc.c:275
#define ALPHABLEND_BINARY
Definition: misc.c:276

Referenced by UXTHEME_DrawImageBackground(), and UXTHEME_DrawImageGlyph().

◆ GetFontResourceInfoW()

BOOL WINAPI GetFontResourceInfoW ( _In_z_ LPCWSTR  lpFileName,
_Inout_ DWORD pdwBufSize,
_Out_writes_to_opt_ *, 1pdwBufSize PVOID  lpBuffer,
_In_ DWORD  dwType 
)

Definition at line 749 of file text.c.

754{
755 BOOL bRet;
756 UNICODE_STRING NtFileName;
757
758 DPRINT("GetFontResourceInfoW: dwType = %lu\n", dwType);
759
760 if (!lpFileName || !pdwBufSize)
761 {
763 return FALSE;
764 }
765
767 &NtFileName,
768 NULL,
769 NULL))
770 {
772 return FALSE;
773 }
774
776 NtFileName.Buffer,
777 (NtFileName.Length / sizeof(WCHAR)) + 1,
778 1,
779 *pdwBufSize,
780 pdwBufSize,
781 lpBuffer,
782 dwType);
783
784 RtlFreeHeap(RtlGetProcessHeap(), 0, NtFileName.Buffer);
785
786 return bRet;
787}
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
#define NULL
Definition: types.h:112
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
unsigned int BOOL
Definition: ntddk_ex.h:94
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiGetFontResourceInfoInternalW(_In_reads_z_(cwc) LPWSTR pwszFiles, _In_ ULONG cwc, _In_ ULONG cFiles, _In_ UINT cjBuf, _Out_ LPDWORD pdwBytes, _Out_writes_bytes_(cjBuf) LPVOID pvBuf, _In_ DWORD iType)
#define DPRINT
Definition: sndvol32.h:71
_In_ LPCSTR lpFileName
Definition: winbase.h:3071
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ GetTextExtentExPointWPri()

BOOL WINAPI GetTextExtentExPointWPri ( HDC  hdc,
LPCWSTR  lpwsz,
INT  cwc,
INT  dxMax,
LPINT  pcCh,
LPINT  pdxOut,
LPSIZE  psize 
)

Referenced by LpkGetTextExtentExPoint().