ReactOS 0.4.15-dev-6679-g945ee4b
dib.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DIB_PAL_BRUSHHACK   3
 

Functions

INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO *info, WORD coloruse)
 
HBITMAP APIENTRY DIB_CreateDIBSection (PDC dc, CONST BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset, DWORD ovr_pitch)
 
int FASTCALL DIB_GetBitmapInfo (const BITMAPINFOHEADER *header, LONG *width, LONG *height, WORD *planes, WORD *bpp, DWORD *compr, DWORD *size)
 
INT APIENTRY DIB_GetDIBImageBytes (INT width, INT height, INT depth)
 
HPALETTE FASTCALL DIB_MapPaletteColors (PPALETTE ppal, CONST BITMAPINFO *lpbmi)
 
HPALETTE FASTCALL BuildDIBPalette (CONST BITMAPINFO *bmi)
 
BITMAPINFO *FASTCALL DIB_ConvertBitmapInfo (CONST BITMAPINFO *bmi, DWORD Usage)
 
VOID FASTCALL DIB_FreeConvertedBitmapInfo (BITMAPINFO *converted, BITMAPINFO *orig, DWORD Usage)
 
INT APIENTRY GreGetDIBitsInternal (HDC hDC, HBITMAP hBitmap, UINT StartScan, UINT ScanLines, LPBYTE Bits, LPBITMAPINFO Info, UINT Usage, UINT MaxBits, UINT MaxInfo)
 
HBITMAP NTAPI GreCreateDIBitmapFromPackedDIB (_In_reads_(cjPackedDIB) PVOID pvPackedDIB, _In_ UINT cjPackedDIB, _In_ ULONG uUsage)
 

Macro Definition Documentation

◆ DIB_PAL_BRUSHHACK

#define DIB_PAL_BRUSHHACK   3

Definition at line 36 of file dib.h.

Function Documentation

◆ BuildDIBPalette()

HPALETTE FASTCALL BuildDIBPalette ( CONST BITMAPINFO bmi)

◆ DIB_BitmapInfoSize()

INT FASTCALL DIB_BitmapInfoSize ( const BITMAPINFO info,
WORD  coloruse 
)

Definition at line 2169 of file dibobj.c.

2170{
2171 unsigned int colors, size, masks = 0;
2172 unsigned int colorsize;
2173
2174 colorsize = (coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) :
2175 (coloruse == DIB_PAL_INDICES) ? 0 :
2176 sizeof(WORD);
2177
2178 if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
2179 {
2180 const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)info;
2181 colors = (core->bcBitCount <= 8) ? 1 << core->bcBitCount : 0;
2182 return sizeof(BITMAPCOREHEADER) + colors * colorsize;
2183 }
2184 else /* Assume BITMAPINFOHEADER */
2185 {
2186 colors = info->bmiHeader.biClrUsed;
2187 if (colors > 256) colors = 256;
2188 if (!colors && (info->bmiHeader.biBitCount <= 8))
2189 colors = 1 << info->bmiHeader.biBitCount;
2190 if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3;
2191 size = max( info->bmiHeader.biSize, sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD) );
2192 return size + colors * colorsize;
2193 }
2194}
#define DIB_PAL_INDICES
ULONG RGBQUAD
Definition: precomp.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizeiptr size
Definition: glext.h:5919
if(dx< 0)
Definition: linetemp.h:194
#define BI_BITFIELDS
Definition: mmreg.h:507
static const BYTE masks[8]
Definition: dib.c:2760
#define max(a, b)
Definition: svc.c:63
#define DIB_RGB_COLORS
Definition: wingdi.h:367

Referenced by _Success_(), GreCreateDIBitmapFromPackedDIB(), and NtGdiCreateDIBSection().

◆ DIB_ConvertBitmapInfo()

BITMAPINFO *FASTCALL DIB_ConvertBitmapInfo ( CONST BITMAPINFO bmi,
DWORD  Usage 
)

Definition at line 2242 of file dibobj.c.

2243{
2245 BITMAPINFO* pNewBmi ;
2246 UINT numColors = 0, ColorsSize = 0;
2247
2248 if(pbmi->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER)) return (BITMAPINFO*)pbmi;
2249 if(pbmi->bmiHeader.biSize != sizeof(BITMAPCOREHEADER)) return NULL;
2250
2251 if(pbmci->bmciHeader.bcBitCount <= 8)
2252 {
2253 numColors = 1 << pbmci->bmciHeader.bcBitCount;
2254 if(Usage == DIB_PAL_COLORS)
2255 {
2256 ColorsSize = numColors * sizeof(WORD);
2257 }
2258 else
2259 {
2260 ColorsSize = numColors * sizeof(RGBQUAD);
2261 }
2262 }
2263 else if (Usage == DIB_PAL_COLORS)
2264 {
2265 /* Invalid at high-res */
2266 return NULL;
2267 }
2268
2269 pNewBmi = ExAllocatePoolWithTag(PagedPool, sizeof(BITMAPINFOHEADER) + ColorsSize, TAG_DIB);
2270 if(!pNewBmi) return NULL;
2271
2272 RtlZeroMemory(pNewBmi, sizeof(BITMAPINFOHEADER) + ColorsSize);
2273
2274 pNewBmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
2275 pNewBmi->bmiHeader.biBitCount = pbmci->bmciHeader.bcBitCount;
2276 pNewBmi->bmiHeader.biWidth = pbmci->bmciHeader.bcWidth;
2277 pNewBmi->bmiHeader.biHeight = pbmci->bmciHeader.bcHeight;
2278 pNewBmi->bmiHeader.biPlanes = pbmci->bmciHeader.bcPlanes;
2279 pNewBmi->bmiHeader.biCompression = BI_RGB ;
2281 pNewBmi->bmiHeader.biHeight,
2282 pNewBmi->bmiHeader.biBitCount);
2283 pNewBmi->bmiHeader.biClrUsed = numColors;
2284
2285 if(Usage == DIB_PAL_COLORS)
2286 {
2287 RtlCopyMemory(pNewBmi->bmiColors, pbmci->bmciColors, ColorsSize);
2288 }
2289 else
2290 {
2291 UINT i;
2292 for(i=0; i<numColors; i++)
2293 {
2294 pNewBmi->bmiColors[i].rgbRed = pbmci->bmciColors[i].rgbtRed;
2295 pNewBmi->bmiColors[i].rgbGreen = pbmci->bmciColors[i].rgbtGreen;
2296 pNewBmi->bmiColors[i].rgbBlue = pbmci->bmciColors[i].rgbtBlue;
2297 }
2298 }
2299
2300 return pNewBmi ;
2301}
INT APIENTRY DIB_GetDIBImageBytes(INT width, INT height, INT depth)
Definition: dibobj.c:2157
#define NULL
Definition: types.h:112
#define BI_RGB
Definition: precomp.h:47
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
unsigned int UINT
Definition: ndis.h:50
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
Definition: ntgdi.h:2780
#define CONST
Definition: pedump.c:81
USHORT biBitCount
Definition: precomp.h:37
ULONG biCompression
Definition: precomp.h:38
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1476
RGBQUAD bmiColors[1]
Definition: wingdi.h:1477
UCHAR rgbBlue
Definition: bootanim.c:97
UCHAR rgbRed
Definition: bootanim.c:99
UCHAR rgbGreen
Definition: bootanim.c:98
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define TAG_DIB
Definition: tags.h:17
#define DIB_PAL_COLORS
Definition: wingdi.h:366

Referenced by GreGetDIBitsInternal(), IntSynthesizeBitmap(), and UserLoadImage().

◆ DIB_CreateDIBSection()

HBITMAP APIENTRY DIB_CreateDIBSection ( PDC  dc,
CONST BITMAPINFO bmi,
UINT  usage,
LPVOID bits,
HANDLE  section,
DWORD  offset,
DWORD  ovr_pitch 
)

Definition at line 1915 of file dibobj.c.

1923{
1924 HBITMAP res = 0;
1925 SURFACE *bmp = NULL;
1926 void *mapBits = NULL;
1927 PPALETTE ppalDIB = NULL;
1928
1929 // Fill BITMAP32 structure with DIB data
1930 CONST BITMAPINFOHEADER *bi = &bmi->bmiHeader;
1931 INT effHeight;
1932 ULONG totalSize;
1933 BITMAP bm;
1934 //SIZEL Size;
1935 HANDLE hSecure;
1936
1937 DPRINT("format (%ld,%ld), planes %u, bpp %u, size %lu, colors %lu (%s)\n",
1938 bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount,
1939 bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB");
1940
1941 /* CreateDIBSection should fail for compressed formats */
1942 if (bi->biCompression == BI_RLE4 || bi->biCompression == BI_RLE8)
1943 {
1944 DPRINT1("no compressed format allowed\n");
1945 return (HBITMAP)NULL;
1946 }
1947
1948 effHeight = bi->biHeight >= 0 ? bi->biHeight : -bi->biHeight;
1949 bm.bmType = 0;
1950 bm.bmWidth = bi->biWidth;
1951 bm.bmHeight = effHeight;
1952 bm.bmWidthBytes = ovr_pitch ? ovr_pitch : WIDTH_BYTES_ALIGN32(bm.bmWidth, bi->biBitCount);
1953
1954 bm.bmPlanes = bi->biPlanes;
1955 bm.bmBitsPixel = bi->biBitCount;
1956 bm.bmBits = NULL;
1957
1958 // Get storage location for DIB bits. Only use biSizeImage if it's valid and
1959 // we're dealing with a compressed bitmap. Otherwise, use width * height.
1960 totalSize = (bi->biSizeImage && (bi->biCompression != BI_RGB) && (bi->biCompression != BI_BITFIELDS))
1961 ? bi->biSizeImage : (ULONG)(bm.bmWidthBytes * effHeight);
1962
1963 if (section)
1964 {
1967 DWORD mapOffset;
1969 SIZE_T mapSize;
1970
1972 &Sbi,
1973 sizeof Sbi,
1974 0);
1975 if (!NT_SUCCESS(Status))
1976 {
1977 DPRINT1("ZwQuerySystemInformation failed (0x%lx)\n", Status);
1978 return NULL;
1979 }
1980
1981 mapOffset = offset - (offset % Sbi.AllocationGranularity);
1982 mapSize = totalSize + (offset - mapOffset);
1983
1984 SectionOffset.LowPart = mapOffset;
1985 SectionOffset.HighPart = 0;
1986
1987 Status = ZwMapViewOfSection(section,
1989 &mapBits,
1990 0,
1991 0,
1993 &mapSize,
1994 ViewShare,
1995 0,
1997 if (!NT_SUCCESS(Status))
1998 {
1999 DPRINT1("ZwMapViewOfSection failed (0x%lx)\n", Status);
2001 return NULL;
2002 }
2003
2004 if (mapBits) bm.bmBits = (char *)mapBits + (offset - mapOffset);
2005 }
2006 else if (ovr_pitch && offset)
2007 bm.bmBits = UlongToPtr(offset);
2008 else
2009 {
2010 offset = 0;
2011 bm.bmBits = EngAllocUserMem(totalSize, 0);
2012 if(!bm.bmBits)
2013 {
2014 DPRINT1("Failed to allocate memory\n");
2015 goto cleanup;
2016 }
2017 }
2018
2019// hSecure = MmSecureVirtualMemory(bm.bmBits, totalSize, PAGE_READWRITE);
2020 hSecure = (HANDLE)0x1; // HACK OF UNIMPLEMENTED KERNEL STUFF !!!!
2021
2022
2023 // Create Device Dependent Bitmap and add DIB pointer
2024 //Size.cx = bm.bmWidth;
2025 //Size.cy = abs(bm.bmHeight);
2026 res = GreCreateBitmapEx(bm.bmWidth,
2027 abs(bm.bmHeight),
2028 bm.bmWidthBytes,
2029 BitmapFormat(bi->biBitCount * bi->biPlanes, bi->biCompression),
2031 ((bi->biHeight < 0) ? BMF_TOPDOWN : 0),
2032 totalSize,
2033 bm.bmBits,
2034 0);
2035 if (!res)
2036 {
2037 DPRINT1("GreCreateBitmapEx failed\n");
2039 goto cleanup;
2040 }
2041 bmp = SURFACE_ShareLockSurface(res); // HACK
2042 if (NULL == bmp)
2043 {
2044 DPRINT1("SURFACE_LockSurface failed\n");
2046 goto cleanup;
2047 }
2048
2049 /* WINE NOTE: WINE makes use of a colormap, which is a color translation
2050 table between the DIB and the X physical device. Obviously,
2051 this is left out of the ReactOS implementation. Instead,
2052 we call NtGdiSetDIBColorTable. */
2053 bmp->hDIBSection = section;
2054 bmp->hSecure = hSecure;
2055 bmp->dwOffset = offset;
2056 bmp->flags = API_BITMAP;
2057 bmp->biClrImportant = bi->biClrImportant;
2058
2059 /* Create a palette for the DIB */
2060 ppalDIB = CreateDIBPalette(bmi, dc, usage);
2061
2062 // Clean up in case of errors
2063cleanup:
2064 if (!res || !bmp || !bm.bmBits || !ppalDIB)
2065 {
2066 DPRINT("Got an error res=%p, bmp=%p, bm.bmBits=%p\n", res, bmp, bm.bmBits);
2067 if (bm.bmBits)
2068 {
2069 // MmUnsecureVirtualMemory(hSecure); // FIXME: Implement this!
2070 if (section)
2071 {
2072 ZwUnmapViewOfSection(NtCurrentProcess(), mapBits);
2073 bm.bmBits = NULL;
2074 }
2075 else if (!offset)
2076 EngFreeUserMem(bm.bmBits), bm.bmBits = NULL;
2077 }
2078
2079 if (bmp)
2080 {
2082 bmp = NULL;
2083 }
2084
2085 if (res)
2086 {
2088 res = 0;
2089 }
2090
2091 if(ppalDIB)
2092 {
2094 }
2095 }
2096
2097 if (bmp)
2098 {
2099 /* If we're here, everything went fine */
2100 SURFACE_vSetPalette(bmp, ppalDIB);
2103 }
2104
2105 // Return BITMAP handle and storage location
2106 if (NULL != bm.bmBits && NULL != bits)
2107 {
2108 *bits = bm.bmBits;
2109 }
2110
2111 return res;
2112}
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
HBITMAP NTAPI GreCreateBitmapEx(_In_ ULONG nWidth, _In_ ULONG nHeight, _In_ ULONG cjWidthBytes, _In_ ULONG iFormat, _In_ USHORT fjBitmap, _In_ ULONG cjSizeImage, _In_opt_ PVOID pvBits, _In_ FLONG flags)
Definition: bitmaps.c:101
PPALETTE NTAPI CreateDIBPalette(_In_ const BITMAPINFO *pbmi, _In_ PDC pdc, _In_ ULONG iUsage)
Definition: dibobj.c:41
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
static void cleanup(void)
Definition: main.c:1335
#define BI_RLE4
Definition: precomp.h:48
#define UlongToPtr(u)
Definition: config.h:106
#define abs(i)
Definition: fconv.c:206
NTSYSAPI NTSTATUS NTAPI ZwQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
@ SystemBasicInformation
Definition: ntddk_ex.h:11
Status
Definition: gdiplustypes.h:25
GLuint res
Definition: glext.h:9613
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
static const WCHAR dc[]
BITMAP bmp
Definition: alphablend.c:62
static HBITMAP
Definition: button.c:44
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER SectionOffset
Definition: mmfuncs.h:407
#define PAGE_READWRITE
Definition: nt_native.h:1304
#define NtCurrentProcess()
Definition: nt_native.h:1657
@ ViewShare
Definition: nt_native.h:1278
#define DPRINT
Definition: sndvol32.h:71
Definition: bl.h:1331
Definition: parser.c:56
#define WIDTH_BYTES_ALIGN32(cx, bpp)
Definition: swimpl.c:16
PVOID HANDLE
Definition: typedefs.h:73
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
ULONG FASTCALL BitmapFormat(ULONG cBits, ULONG iCompression)
Definition: surface.c:39
#define SURFACE_ShareUnlockSurface(pBMObj)
Definition: surface.h:102
FORCEINLINE VOID SURFACE_vSetPalette(_Inout_ PSURFACE psurf, _In_ PPALETTE ppal)
Definition: surface.h:136
@ API_BITMAP
Definition: surface.h:76
#define SURFACE_ShareLockSurface(hBMObj)
Definition: surface.h:91
BOOL NTAPI GreDeleteObject(HGDIOBJ hobj)
Definition: gdiobj.c:1158
#define PALETTE_ShareUnlockPalette(ppal)
Definition: palette.h:59
#define BMF_DONTCACHE
Definition: winddi.h:1182
ENGAPI VOID APIENTRY EngFreeUserMem(_Pre_notnull_ __drv_freesMem(UserMem) PVOID pv)
#define BMF_TOPDOWN
Definition: winddi.h:1180
#define BMF_USERMEM
Definition: winddi.h:1183
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:28
#define BMF_NOZEROINIT
Definition: winddi.h:1181
#define ERROR_NO_SYSTEM_RESOURCES
Definition: winerror.h:931
#define BI_RLE8
Definition: wingdi.h:35

Referenced by GreGetDIBitsInternal(), IntCreateCompatibleBitmap(), and NtGdiCreateDIBSection().

◆ DIB_FreeConvertedBitmapInfo()

VOID FASTCALL DIB_FreeConvertedBitmapInfo ( BITMAPINFO converted,
BITMAPINFO orig,
DWORD  Usage 
)

Definition at line 2306 of file dibobj.c.

2307{
2308 BITMAPCOREINFO* pbmci;
2309 if(converted == orig)
2310 return;
2311
2312 if(usage == -1)
2313 {
2314 /* Caller don't want any conversion */
2315 ExFreePoolWithTag(converted, TAG_DIB);
2316 return;
2317 }
2318
2319 /* Perform inverse conversion */
2320 pbmci = (BITMAPCOREINFO*)orig;
2321
2322 ASSERT(pbmci->bmciHeader.bcSize == sizeof(BITMAPCOREHEADER));
2323 pbmci->bmciHeader.bcBitCount = converted->bmiHeader.biBitCount;
2324 pbmci->bmciHeader.bcWidth = converted->bmiHeader.biWidth;
2325 pbmci->bmciHeader.bcHeight = converted->bmiHeader.biHeight;
2326 pbmci->bmciHeader.bcPlanes = converted->bmiHeader.biPlanes;
2327
2328 if(pbmci->bmciHeader.bcBitCount <= 8)
2329 {
2330 UINT numColors = converted->bmiHeader.biClrUsed;
2331 if(!numColors) numColors = 1 << pbmci->bmciHeader.bcBitCount;
2332 if(usage == DIB_PAL_COLORS)
2333 {
2334 RtlZeroMemory(pbmci->bmciColors, (1 << pbmci->bmciHeader.bcBitCount) * sizeof(WORD));
2335 RtlCopyMemory(pbmci->bmciColors, converted->bmiColors, numColors * sizeof(WORD));
2336 }
2337 else
2338 {
2339 UINT i;
2340 RtlZeroMemory(pbmci->bmciColors, (1 << pbmci->bmciHeader.bcBitCount) * sizeof(RGBTRIPLE));
2341 for(i=0; i<numColors; i++)
2342 {
2343 pbmci->bmciColors[i].rgbtRed = converted->bmiColors[i].rgbRed;
2344 pbmci->bmciColors[i].rgbtGreen = converted->bmiColors[i].rgbGreen;
2345 pbmci->bmciColors[i].rgbtBlue = converted->bmiColors[i].rgbBlue;
2346 }
2347 }
2348 }
2349 /* Now free it, it's not needed anymore */
2350 ExFreePoolWithTag(converted, TAG_DIB);
2351}
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
BITMAPCOREHEADER bmciHeader
Definition: wingdi.h:1453
RGBTRIPLE bmciColors[1]
Definition: wingdi.h:1454
BYTE rgbtGreen
Definition: wingdi.h:1439
BYTE rgbtBlue
Definition: wingdi.h:1438
BYTE rgbtRed
Definition: wingdi.h:1440

Referenced by GreGetDIBitsInternal(), IntSynthesizeBitmap(), and UserLoadImage().

◆ DIB_GetBitmapInfo()

int FASTCALL DIB_GetBitmapInfo ( const BITMAPINFOHEADER header,
LONG width,
LONG height,
WORD planes,
WORD bpp,
DWORD compr,
DWORD size 
)

Definition at line 2122 of file dibobj.c.

2124{
2125 if (header->biSize == sizeof(BITMAPCOREHEADER))
2126 {
2127 const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)header;
2128 *width = core->bcWidth;
2129 *height = core->bcHeight;
2130 *planes = core->bcPlanes;
2131 *bpp = core->bcBitCount;
2132 *compr = BI_RGB;
2133 *size = 0;
2134 return 0;
2135 }
2136 if (header->biSize >= sizeof(BITMAPINFOHEADER)) /* Assume BITMAPINFOHEADER */
2137 {
2138 *width = header->biWidth;
2139 *height = header->biHeight;
2140 *planes = header->biPlanes;
2141 *bpp = header->biBitCount;
2142 *compr = header->biCompression;
2143 *size = header->biSizeImage;
2144 return 1;
2145 }
2146 DPRINT1("(%u): unknown/wrong size for header\n", header->biSize );
2147 return -1;
2148}
DWORD bpp
Definition: surface.c:185
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
static int __cdecl compr(const void *a, const void *b)
Definition: bidi.c:641

Referenced by GreGetDIBitsInternal().

◆ DIB_GetDIBImageBytes()

INT APIENTRY DIB_GetDIBImageBytes ( INT  width,
INT  height,
INT  depth 
)

Definition at line 2157 of file dibobj.c.

2158{
2159 return WIDTH_BYTES_ALIGN32(width, depth) * (height < 0 ? -height : height);
2160}
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546

Referenced by DIB_ConvertBitmapInfo(), GreGetDIBitsInternal(), and IntSetDIBits().

◆ DIB_MapPaletteColors()

HPALETTE FASTCALL DIB_MapPaletteColors ( PPALETTE  ppal,
CONST BITMAPINFO lpbmi 
)

Definition at line 2198 of file dibobj.c.

2199{
2200 PPALETTE ppalNew;
2201 ULONG nNumColors,i;
2202 USHORT *lpIndex;
2203 HPALETTE hpal;
2204
2205 if (!(ppalDc->flFlags & PAL_INDEXED))
2206 {
2207 return NULL;
2208 }
2209
2210 nNumColors = 1 << lpbmi->bmiHeader.biBitCount;
2211 if (lpbmi->bmiHeader.biClrUsed)
2212 {
2213 nNumColors = min(nNumColors, lpbmi->bmiHeader.biClrUsed);
2214 }
2215
2216 ppalNew = PALETTE_AllocPalWithHandle(PAL_INDEXED, nNumColors, NULL, 0, 0, 0);
2217 if (ppalNew == NULL)
2218 {
2219 DPRINT1("Could not allocate palette\n");
2220 return NULL;
2221 }
2222
2223 lpIndex = (USHORT *)((PBYTE)lpbmi + lpbmi->bmiHeader.biSize);
2224
2225 for (i = 0; i < nNumColors; i++)
2226 {
2227 ULONG iColorIndex = *lpIndex % ppalDc->NumColors;
2228 ppalNew->IndexedColors[i] = ppalDc->IndexedColors[iColorIndex];
2229 lpIndex++;
2230 }
2231
2232 hpal = ppalNew->BaseObject.hHmgr;
2233 PALETTE_UnlockPalette(ppalNew);
2234
2235 return hpal;
2236}
HGDIOBJ hHmgr(VOID)
Definition: baseobj.hpp:95
#define min(a, b)
Definition: monoChain.cc:55
BYTE * PBYTE
Definition: pedump.c:66
unsigned short USHORT
Definition: pedump.c:61
BASEOBJECT BaseObject
Definition: palette.h:36
PALETTEENTRY * IndexedColors
Definition: palette.h:42
PPALETTE NTAPI PALETTE_AllocPalWithHandle(_In_ ULONG iMode, _In_ ULONG cColors, _In_opt_ const PALETTEENTRY *pEntries, _In_ FLONG flRed, _In_ FLONG flGreen, _In_ FLONG flBlue)
Definition: palette.c:209
#define PALETTE_UnlockPalette(pPalette)
Definition: palette.h:56
#define PAL_INDEXED
Definition: winddi.h:1561

◆ GreCreateDIBitmapFromPackedDIB()

HBITMAP NTAPI GreCreateDIBitmapFromPackedDIB ( _In_reads_(cjPackedDIB) PVOID  pvPackedDIB,
_In_ UINT  cjPackedDIB,
_In_ ULONG  uUsage 
)

Definition at line 1797 of file dibobj.c.

1801{
1803 PBYTE pjBits;
1804 UINT cjInfo, cjBits;
1805 HBITMAP hbm;
1806
1807 /* We only support BITMAPINFOHEADER, make sure the size is ok */
1808 if (cjPackedDIB < sizeof(BITMAPINFOHEADER))
1809 {
1810 return NULL;
1811 }
1812
1813 /* The packed DIB starts with the BITMAPINFOHEADER */
1814 pbmi = pvPackedDIB;
1815
1816 if (cjPackedDIB < pbmi->bmiHeader.biSize)
1817 {
1818 return NULL;
1819 }
1820
1821 /* Calculate the info size and make sure the packed DIB is large enough */
1822 cjInfo = DIB_BitmapInfoSize(pbmi, uUsage);
1823 if (cjPackedDIB <= cjInfo)
1824 {
1825 return NULL;
1826 }
1827
1828 /* The bitmap bits start after the header */
1829 pjBits = (PBYTE)pvPackedDIB + cjInfo;
1830 cjBits = cjPackedDIB - cjInfo;
1831
1836 pjBits,
1837 pbmi,
1838 uUsage,
1839 0,
1840 cjBits,
1841 NULL);
1842
1843 return hbm;
1844}
#define CBM_CREATDIB
INT FASTCALL DIB_BitmapInfoSize(const BITMAPINFO *info, WORD coloruse)
Definition: dibobj.c:2169
HBITMAP NTAPI GreCreateDIBitmapInternal(IN HDC hDc, IN INT cx, IN INT cy, IN DWORD fInit, IN OPTIONAL LPBYTE pjInit, IN OPTIONAL PBITMAPINFO pbmi, IN DWORD iUsage, IN FLONG fl, IN UINT cjMaxBits, IN HANDLE hcmXform)
Definition: dibobj.c:1721
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
#define CBM_INIT
Definition: wingdi.h:365

Referenced by NtGdiCreateDIBBrush().

◆ GreGetDIBitsInternal()

INT APIENTRY GreGetDIBitsInternal ( HDC  hDC,
HBITMAP  hBitmap,
UINT  StartScan,
UINT  ScanLines,
LPBYTE  Bits,
LPBITMAPINFO  Info,
UINT  Usage,
UINT  MaxBits,
UINT  MaxInfo 
)

Definition at line 718 of file dibobj.c.

728{
729 BITMAPCOREINFO* pbmci = NULL;
730 PSURFACE psurf = NULL;
731 PDC pDC;
733 WORD planes, bpp;
734 DWORD compr, size ;
735 USHORT i;
736 int bitmap_type;
737 RGBQUAD* rgbQuads;
738 VOID* colorPtr;
739
740 DPRINT("Entered GreGetDIBitsInternal()\n");
741
742 if ((Usage && Usage != DIB_PAL_COLORS) || !Info || !hBitmap)
743 return 0;
744
745 pDC = DC_LockDc(hDC);
746 if (pDC == NULL || pDC->dctype == DCTYPE_INFO)
747 {
748 ScanLines = 0;
749 goto done;
750 }
751
752 /* Get a pointer to the source bitmap object */
754 if (psurf == NULL)
755 {
756 ScanLines = 0;
757 goto done;
758 }
759
760 colorPtr = (LPBYTE)Info + Info->bmiHeader.biSize;
761 rgbQuads = colorPtr;
762
763 bitmap_type = DIB_GetBitmapInfo(&Info->bmiHeader,
764 &width,
765 &height,
766 &planes,
767 &bpp,
768 &compr,
769 &size);
770 if(bitmap_type == -1)
771 {
772 DPRINT1("Wrong bitmap format\n");
774 ScanLines = 0;
775 goto done;
776 }
777 else if(bitmap_type == 0)
778 {
779 /* We need a BITMAPINFO to create a DIB, but we have to fill
780 * the BITMAPCOREINFO we're provided */
781 pbmci = (BITMAPCOREINFO*)Info;
782 /* fill in the the bit count, so we can calculate the right ColorsSize during the conversion */
785 if(Info == NULL)
786 {
787 DPRINT1("Error, could not convert the BITMAPCOREINFO!\n");
788 ScanLines = 0;
789 goto done;
790 }
791 rgbQuads = Info->bmiColors;
792 }
793
794 /* Validate input:
795 - negative width is always an invalid value
796 - non-null Bits and zero bpp is an invalid combination
797 - only check the rest of the input params if either bpp is non-zero or Bits are set */
798 if (width < 0 || (bpp == 0 && Bits))
799 {
800 ScanLines = 0;
801 goto done;
802 }
803
804 if (Bits || bpp)
805 {
806 if ((height == 0 || width == 0) || (compr && compr != BI_BITFIELDS && compr != BI_RGB))
807 {
808 ScanLines = 0;
809 goto done;
810 }
811 }
812
813 Info->bmiHeader.biClrUsed = 0;
814 Info->bmiHeader.biClrImportant = 0;
815
816 /* Fill in the structure */
817 switch(bpp)
818 {
819 case 0: /* Only info */
820 Info->bmiHeader.biWidth = psurf->SurfObj.sizlBitmap.cx;
821 Info->bmiHeader.biHeight = (psurf->SurfObj.fjBitmap & BMF_TOPDOWN) ?
822 -psurf->SurfObj.sizlBitmap.cy :
823 psurf->SurfObj.sizlBitmap.cy;
824 Info->bmiHeader.biPlanes = 1;
825 Info->bmiHeader.biBitCount = BitsPerFormat(psurf->SurfObj.iBitmapFormat);
826 Info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes( Info->bmiHeader.biWidth,
827 Info->bmiHeader.biHeight,
828 Info->bmiHeader.biBitCount);
829 Info->bmiHeader.biCompression = (Info->bmiHeader.biBitCount == 16 || Info->bmiHeader.biBitCount == 32) ?
831 Info->bmiHeader.biXPelsPerMeter = 0;
832 Info->bmiHeader.biYPelsPerMeter = 0;
833
834 if (Info->bmiHeader.biBitCount <= 8 && Info->bmiHeader.biClrUsed == 0)
835 Info->bmiHeader.biClrUsed = 1 << Info->bmiHeader.biBitCount;
836
837 ScanLines = 1;
838 goto done;
839
840 case 1:
841 case 4:
842 case 8:
843 Info->bmiHeader.biClrUsed = 1 << bpp;
844
845 /* If the bitmap is a DIB section and has the same format as what
846 * is requested, go ahead! */
847 if((psurf->hSecure) &&
849 {
850 if(Usage == DIB_RGB_COLORS)
851 {
852 ULONG colors = min(psurf->ppal->NumColors, 256);
853 if(colors != 256) Info->bmiHeader.biClrUsed = colors;
854 for(i = 0; i < colors; i++)
855 {
856 rgbQuads[i].rgbRed = psurf->ppal->IndexedColors[i].peRed;
857 rgbQuads[i].rgbGreen = psurf->ppal->IndexedColors[i].peGreen;
858 rgbQuads[i].rgbBlue = psurf->ppal->IndexedColors[i].peBlue;
859 rgbQuads[i].rgbReserved = 0;
860 }
861 }
862 else
863 {
864 for(i = 0; i < 256; i++)
865 ((WORD*)rgbQuads)[i] = i;
866 }
867 }
868 else
869 {
870 if(Usage == DIB_PAL_COLORS)
871 {
872 for(i = 0; i < 256; i++)
873 {
874 ((WORD*)rgbQuads)[i] = i;
875 }
876 }
877 else if(bpp > 1 && bpp == BitsPerFormat(psurf->SurfObj.iBitmapFormat))
878 {
879 /* For color DDBs in native depth (mono DDBs always have
880 a black/white palette):
881 Generate the color map from the selected palette */
882 PPALETTE pDcPal = PALETTE_ShareLockPalette(pDC->dclevel.hpal);
883 if(!pDcPal)
884 {
885 ScanLines = 0 ;
886 goto done ;
887 }
888 for (i = 0; i < pDcPal->NumColors; i++)
889 {
890 rgbQuads[i].rgbRed = pDcPal->IndexedColors[i].peRed;
891 rgbQuads[i].rgbGreen = pDcPal->IndexedColors[i].peGreen;
892 rgbQuads[i].rgbBlue = pDcPal->IndexedColors[i].peBlue;
893 rgbQuads[i].rgbReserved = 0;
894 }
896 }
897 else
898 {
899 switch (bpp)
900 {
901 case 1:
902 rgbQuads[0].rgbRed = rgbQuads[0].rgbGreen = rgbQuads[0].rgbBlue = 0;
903 rgbQuads[0].rgbReserved = 0;
904 rgbQuads[1].rgbRed = rgbQuads[1].rgbGreen = rgbQuads[1].rgbBlue = 0xff;
905 rgbQuads[1].rgbReserved = 0;
906 break;
907
908 case 4:
909 /* The EGA palette is the first and last 8 colours of the default palette
910 with the innermost pair swapped */
911 RtlCopyMemory(rgbQuads, DefLogPaletteQuads, 7 * sizeof(RGBQUAD));
912 RtlCopyMemory(rgbQuads + 7, DefLogPaletteQuads + 12, 1 * sizeof(RGBQUAD));
913 RtlCopyMemory(rgbQuads + 8, DefLogPaletteQuads + 7, 1 * sizeof(RGBQUAD));
914 RtlCopyMemory(rgbQuads + 9, DefLogPaletteQuads + 13, 7 * sizeof(RGBQUAD));
915 break;
916
917 case 8:
918 {
919 INT i;
920
921 memcpy(rgbQuads, DefLogPaletteQuads, 10 * sizeof(RGBQUAD));
922 memcpy(rgbQuads + 246, DefLogPaletteQuads + 10, 10 * sizeof(RGBQUAD));
923
924 for (i = 10; i < 246; i++)
925 {
926 rgbQuads[i].rgbRed = (i & 0x07) << 5;
927 rgbQuads[i].rgbGreen = (i & 0x38) << 2;
928 rgbQuads[i].rgbBlue = i & 0xc0;
929 rgbQuads[i].rgbReserved = 0;
930 }
931 }
932 }
933 }
934 }
935 break;
936
937 case 15:
938 if (Info->bmiHeader.biCompression == BI_BITFIELDS)
939 {
940 ((PDWORD)Info->bmiColors)[0] = 0x7c00;
941 ((PDWORD)Info->bmiColors)[1] = 0x03e0;
942 ((PDWORD)Info->bmiColors)[2] = 0x001f;
943 }
944 break;
945
946 case 16:
947 if (Info->bmiHeader.biCompression == BI_BITFIELDS)
948 {
949 if (psurf->hSecure)
950 {
951 ((PDWORD)Info->bmiColors)[0] = psurf->ppal->RedMask;
952 ((PDWORD)Info->bmiColors)[1] = psurf->ppal->GreenMask;
953 ((PDWORD)Info->bmiColors)[2] = psurf->ppal->BlueMask;
954 }
955 else
956 {
957 ((PDWORD)Info->bmiColors)[0] = 0xf800;
958 ((PDWORD)Info->bmiColors)[1] = 0x07e0;
959 ((PDWORD)Info->bmiColors)[2] = 0x001f;
960 }
961 }
962 break;
963
964 case 24:
965 case 32:
966 if (Info->bmiHeader.biCompression == BI_BITFIELDS)
967 {
968 if (psurf->hSecure)
969 {
970 ((PDWORD)Info->bmiColors)[0] = psurf->ppal->RedMask;
971 ((PDWORD)Info->bmiColors)[1] = psurf->ppal->GreenMask;
972 ((PDWORD)Info->bmiColors)[2] = psurf->ppal->BlueMask;
973 }
974 else
975 {
976 ((PDWORD)Info->bmiColors)[0] = 0xff0000;
977 ((PDWORD)Info->bmiColors)[1] = 0x00ff00;
978 ((PDWORD)Info->bmiColors)[2] = 0x0000ff;
979 }
980 }
981 break;
982
983 default:
984 ScanLines = 0;
985 goto done;
986 }
987
988 Info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes(width, height, bpp);
989 Info->bmiHeader.biPlanes = 1;
990
991 if(Bits && ScanLines)
992 {
993 /* Create a DIBSECTION, blt it, profit */
994 PVOID pDIBits ;
995 HBITMAP hBmpDest;
996 PSURFACE psurfDest;
997 EXLATEOBJ exlo;
998 RECT rcDest;
999 POINTL srcPoint;
1000 BOOL ret ;
1001 int newLines = -1;
1002
1003 if (StartScan >= abs(Info->bmiHeader.biHeight))
1004 {
1005 ScanLines = 1;
1006 goto done;
1007 }
1008 else
1009 {
1010 ScanLines = min(ScanLines, abs(Info->bmiHeader.biHeight) - StartScan);
1011 }
1012
1013 if (abs(Info->bmiHeader.biHeight) < psurf->SurfObj.sizlBitmap.cy)
1014 {
1015 StartScan += psurf->SurfObj.sizlBitmap.cy - abs(Info->bmiHeader.biHeight);
1016 }
1017 /* Fixup values */
1018 Info->bmiHeader.biHeight = (height < 0) ?
1019 -(LONG)ScanLines : ScanLines;
1020 /* Create the DIB */
1021 hBmpDest = DIB_CreateDIBSection(pDC, Info, Usage, &pDIBits, NULL, 0, 0);
1022 /* Restore them */
1023 Info->bmiHeader.biHeight = height;
1024
1025 if(!hBmpDest)
1026 {
1027 DPRINT1("Unable to create a DIB Section!\n");
1029 ScanLines = 0;
1030 goto done ;
1031 }
1032
1033 psurfDest = SURFACE_ShareLockSurface(hBmpDest);
1034
1035 RECTL_vSetRect(&rcDest, 0, 0, Info->bmiHeader.biWidth, ScanLines);
1036 Info->bmiHeader.biWidth = width;
1037 srcPoint.x = 0;
1038
1039 if (abs(Info->bmiHeader.biHeight) <= psurf->SurfObj.sizlBitmap.cy)
1040 {
1041 srcPoint.y = psurf->SurfObj.sizlBitmap.cy - StartScan - ScanLines;
1042 }
1043 else
1044 {
1045 /* Determine the actual number of lines copied from the */
1046 /* original bitmap. It might be different from ScanLines. */
1047 newLines = abs(Info->bmiHeader.biHeight) - psurf->SurfObj.sizlBitmap.cy;
1048 newLines = min((int)(StartScan + ScanLines - newLines), psurf->SurfObj.sizlBitmap.cy);
1049 if (newLines > 0)
1050 {
1051 srcPoint.y = psurf->SurfObj.sizlBitmap.cy - newLines;
1052 if (StartScan > psurf->SurfObj.sizlBitmap.cy)
1053 {
1054 newLines -= (StartScan - psurf->SurfObj.sizlBitmap.cy);
1055 }
1056 }
1057 else
1058 {
1059 newLines = 0;
1060 srcPoint.y = psurf->SurfObj.sizlBitmap.cy;
1061 }
1062 }
1063
1064 EXLATEOBJ_vInitialize(&exlo, psurf->ppal, psurfDest->ppal, 0xffffff, 0xffffff, 0);
1065
1066 ret = IntEngCopyBits(&psurfDest->SurfObj,
1067 &psurf->SurfObj,
1068 NULL,
1069 &exlo.xlo,
1070 &rcDest,
1071 &srcPoint);
1072
1073 SURFACE_ShareUnlockSurface(psurfDest);
1074
1075 if(!ret)
1076 ScanLines = 0;
1077 else
1078 {
1079 RtlCopyMemory(Bits, pDIBits, DIB_GetDIBImageBytes (width, ScanLines, bpp));
1080 }
1081 /* Update if line count has changed */
1082 if (newLines != -1)
1083 {
1084 ScanLines = (UINT)newLines;
1085 }
1086 GreDeleteObject(hBmpDest);
1087 EXLATEOBJ_vCleanup(&exlo);
1088 }
1089 else
1090 {
1091 /* Signals success and not the actual number of scan lines*/
1092 ScanLines = 1;
1093 }
1094
1095done:
1096
1097 if (pbmci)
1099
1100 if (psurf)
1102
1103 if (pDC)
1104 DC_UnlockDc(pDC);
1105
1106 return ScanLines;
1107}
static HDC hDC
Definition: 3dtext.c:33
BOOL APIENTRY IntEngCopyBits(SURFOBJ *psoTrg, SURFOBJ *psoSrc, CLIPOBJ *pco, XLATEOBJ *pxlo, RECTL *prclTrg, POINTL *pptlSrc)
Definition: bitblt_new.c:678
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:238
@ DCTYPE_INFO
Definition: dc.h:43
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:220
static const RGBQUAD DefLogPaletteQuads[20]
Definition: dibobj.c:14
BITMAPINFO *FASTCALL DIB_ConvertBitmapInfo(CONST BITMAPINFO *pbmi, DWORD Usage)
Definition: dibobj.c:2242
int FASTCALL DIB_GetBitmapInfo(const BITMAPINFOHEADER *header, LONG *width, LONG *height, WORD *planes, WORD *bpp, DWORD *compr, DWORD *size)
Definition: dibobj.c:2122
VOID FASTCALL DIB_FreeConvertedBitmapInfo(BITMAPINFO *converted, BITMAPINFO *orig, DWORD usage)
Definition: dibobj.c:2306
HBITMAP APIENTRY DIB_CreateDIBSection(PDC dc, CONST BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset, DWORD ovr_pitch)
Definition: dibobj.c:1915
static HBITMAP hBitmap
Definition: timezone.c:26
unsigned int BOOL
Definition: ntddk_ex.h:94
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
DWORD * PDWORD
Definition: pedump.c:68
long LONG
Definition: pedump.c:60
Definition: polytest.cpp:41
XLATEOBJ xlo
Definition: xlateobj.h:21
ULONG NumColors
Definition: palette.h:41
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
SURFOBJ SurfObj
Definition: surface.h:8
HANDLE hSecure
Definition: surface.h:32
struct _PALETTE *const ppal
Definition: surface.h:11
USHORT fjBitmap
Definition: winddi.h:1217
SIZEL sizlBitmap
Definition: winddi.h:1209
ULONG iBitmapFormat
Definition: winddi.h:1215
unsigned char * LPBYTE
Definition: typedefs.h:53
int ret
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
#define BitsPerFormat(Format)
Definition: surface.h:109
#define PALETTE_ShareLockPalette(hpal)
Definition: palette.h:57
FORCEINLINE VOID RECTL_vSetRect(_Out_ RECTL *prcl, _In_ LONG left, _In_ LONG top, _In_ LONG right, _In_ LONG bottom)
Definition: rect.h:5
VOID NTAPI EXLATEOBJ_vInitialize(_Out_ PEXLATEOBJ pexlo, _In_opt_ PALETTE *ppalSrc, _In_opt_ PALETTE *ppalDst, _In_ COLORREF crSrcBackColor, _In_ COLORREF crDstBackColor, _In_ COLORREF crDstForeColor)
Definition: xlateobj.c:358
VOID NTAPI EXLATEOBJ_vCleanup(_Inout_ PEXLATEOBJ pexlo)
Definition: xlateobj.c:649

Referenced by _Success_(), and IntSynthesizeDib().