ReactOS  0.4.14-dev-999-g61c8d34
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)
 

Macro Definition Documentation

◆ DS_TILE

#define DS_TILE   0x2

Definition at line 5 of file undocgdi.h.

◆ DS_TRANSPARENTALPHA

#define DS_TRANSPARENTALPHA   0x4

Definition at line 6 of file undocgdi.h.

◆ DS_TRANSPARENTCLR

#define DS_TRANSPARENTCLR   0x8

Definition at line 7 of file undocgdi.h.

◆ DS_TRUESIZE

#define DS_TRUESIZE   0x20

Definition at line 8 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:6
#define DS_TILE
Definition: undocgdi.h:5
#define ALPHABLEND_BINARY
Definition: misc.c:276
LONG top
Definition: windef.h:307
#define DS_TRANSPARENTCLR
Definition: undocgdi.h:7
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
int32_t INT
Definition: typedefs.h:57
Definition: misc.c:279
DWORD bottomSizingMargin
Definition: undocgdi.h:25
#define ALPHABLEND_FULL
Definition: misc.c:277
DWORD leftSizingMargin
Definition: undocgdi.h:22
int cyBottomHeight
Definition: misc.c:283
DWORD rightSizingMargin
Definition: undocgdi.h:23
DWORD topSizingMargin
Definition: undocgdi.h:24
#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:8
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().

◆ GetTextExtentExPointWPri()

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

Referenced by LpkGetTextExtentExPoint().