ReactOS  0.4.15-dev-1070-ge1a01de
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 
666  if (pDS->drawOption & DS_TRANSPARENTALPHA)
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 DS_TRANSPARENTALPHA
Definition: undocgdi.h:10
#define DS_TILE
Definition: undocgdi.h:9
#define ALPHABLEND_BINARY
Definition: misc.c:276
LONG top
Definition: windef.h:307
#define DS_TRANSPARENTCLR
Definition: undocgdi.h:11
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
int32_t INT
Definition: typedefs.h:58
Definition: misc.c:279
DWORD bottomSizingMargin
Definition: undocgdi.h:29
#define ALPHABLEND_FULL
Definition: misc.c:277
#define FALSE
Definition: types.h:117
DWORD leftSizingMargin
Definition: undocgdi.h:26
int cyBottomHeight
Definition: misc.c:283
DWORD rightSizingMargin
Definition: undocgdi.h:27
DWORD topSizingMargin
Definition: undocgdi.h:28
#define ALPHABLEND_NONE
Definition: misc.c:275
r l[0]
Definition: byte_order.h:167
int cyTopHeight
Definition: misc.c:282
int cxLeftWidth
Definition: misc.c:280
Definition: misc.c:289
#define DPRINT1
Definition: precomp.h:8
#define DS_TRUESIZE
Definition: undocgdi.h:12
LONG bottom
Definition: windef.h:309
int cxRightWidth
Definition: misc.c:281
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

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 716 of file text.c.

721 {
722  BOOL bRet;
723  UNICODE_STRING NtFileName;
724 
725  DPRINT("GetFontResourceInfoW: dwType = %lu\n", dwType);
726 
727  if (!lpFileName || !pdwBufSize)
728  {
730  return FALSE;
731  }
732 
734  &NtFileName,
735  NULL,
736  NULL))
737  {
739  return FALSE;
740  }
741 
743  NtFileName.Buffer,
744  (NtFileName.Length / sizeof(WCHAR)) + 1,
745  1,
746  *pdwBufSize,
747  pdwBufSize,
748  lpBuffer,
749  dwType);
750 
751  RtlFreeHeap(RtlGetProcessHeap(), 0, NtFileName.Buffer);
752 
753  return bRet;
754 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
__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)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SetLastError(x)
Definition: compat.h:500
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
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)
_In_ LPCSTR lpFileName
Definition: winbase.h:3034

◆ GetTextExtentExPointWPri()

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

Referenced by LpkGetTextExtentExPoint().