ReactOS 0.4.15-dev-8135-g1bc6c90
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 2165 of file dibobj.c.

2166{
2167 unsigned int colors, size, masks = 0;
2168 unsigned int colorsize;
2169
2170 colorsize = (coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) :
2171 (coloruse == DIB_PAL_INDICES) ? 0 :
2172 sizeof(WORD);
2173
2174 if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
2175 {
2176 const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)info;
2177 colors = (core->bcBitCount <= 8) ? 1 << core->bcBitCount : 0;
2178 return sizeof(BITMAPCOREHEADER) + colors * colorsize;
2179 }
2180 else /* Assume BITMAPINFOHEADER */
2181 {
2182 colors = info->bmiHeader.biClrUsed;
2183 if (colors > 256) colors = 256;
2184 if (!colors && (info->bmiHeader.biBitCount <= 8))
2185 colors = 1 << info->bmiHeader.biBitCount;
2186 if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3;
2187 size = max( info->bmiHeader.biSize, sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD) );
2188 return size + colors * colorsize;
2189 }
2190}
#define DIB_PAL_INDICES
ULONG RGBQUAD
Definition: precomp.h:59
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 2238 of file dibobj.c.

2239{
2241 BITMAPINFO* pNewBmi ;
2242 UINT numColors = 0, ColorsSize = 0;
2243
2244 if(pbmi->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER)) return (BITMAPINFO*)pbmi;
2245 if(pbmi->bmiHeader.biSize != sizeof(BITMAPCOREHEADER)) return NULL;
2246
2247 if(pbmci->bmciHeader.bcBitCount <= 8)
2248 {
2249 numColors = 1 << pbmci->bmciHeader.bcBitCount;
2250 if(Usage == DIB_PAL_COLORS)
2251 {
2252 ColorsSize = numColors * sizeof(WORD);
2253 }
2254 else
2255 {
2256 ColorsSize = numColors * sizeof(RGBQUAD);
2257 }
2258 }
2259 else if (Usage == DIB_PAL_COLORS)
2260 {
2261 /* Invalid at high-res */
2262 return NULL;
2263 }
2264
2265 pNewBmi = ExAllocatePoolWithTag(PagedPool, sizeof(BITMAPINFOHEADER) + ColorsSize, TAG_DIB);
2266 if(!pNewBmi) return NULL;
2267
2268 RtlZeroMemory(pNewBmi, sizeof(BITMAPINFOHEADER) + ColorsSize);
2269
2270 pNewBmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
2271 pNewBmi->bmiHeader.biBitCount = pbmci->bmciHeader.bcBitCount;
2272 pNewBmi->bmiHeader.biWidth = pbmci->bmciHeader.bcWidth;
2273 pNewBmi->bmiHeader.biHeight = pbmci->bmciHeader.bcHeight;
2274 pNewBmi->bmiHeader.biPlanes = pbmci->bmciHeader.bcPlanes;
2275 pNewBmi->bmiHeader.biCompression = BI_RGB ;
2277 pNewBmi->bmiHeader.biHeight,
2278 pNewBmi->bmiHeader.biBitCount);
2279 pNewBmi->bmiHeader.biClrUsed = numColors;
2280
2281 if(Usage == DIB_PAL_COLORS)
2282 {
2283 RtlCopyMemory(pNewBmi->bmiColors, pbmci->bmciColors, ColorsSize);
2284 }
2285 else
2286 {
2287 UINT i;
2288 for(i=0; i<numColors; i++)
2289 {
2290 pNewBmi->bmiColors[i].rgbRed = pbmci->bmciColors[i].rgbtRed;
2291 pNewBmi->bmiColors[i].rgbGreen = pbmci->bmciColors[i].rgbtGreen;
2292 pNewBmi->bmiColors[i].rgbBlue = pbmci->bmciColors[i].rgbtBlue;
2293 }
2294 }
2295
2296 return pNewBmi ;
2297}
INT APIENTRY DIB_GetDIBImageBytes(INT width, INT height, INT depth)
Definition: dibobj.c:2153
#define NULL
Definition: types.h:112
#define BI_RGB
Definition: precomp.h:56
#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:46
ULONG biCompression
Definition: precomp.h:47
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1476
RGBQUAD bmiColors[1]
Definition: wingdi.h:1477
UCHAR rgbBlue
Definition: bootanim.c:103
UCHAR rgbRed
Definition: bootanim.c:105
UCHAR rgbGreen
Definition: bootanim.c:104
#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 1912 of file dibobj.c.

1920{
1921 HBITMAP res = 0;
1922 SURFACE *bmp = NULL;
1923 void *mapBits = NULL;
1924 PPALETTE ppalDIB = NULL;
1925
1926 // Fill BITMAP32 structure with DIB data
1927 CONST BITMAPINFOHEADER *bi = &bmi->bmiHeader;
1928 INT effHeight;
1929 ULONG totalSize;
1930 BITMAP bm;
1931 //SIZEL Size;
1932 HANDLE hSecure;
1933
1934 DPRINT("format (%ld,%ld), planes %u, bpp %u, size %lu, colors %lu (%s)\n",
1935 bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount,
1936 bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB");
1937
1938 /* CreateDIBSection should fail for compressed formats */
1939 if (bi->biCompression == BI_RLE4 || bi->biCompression == BI_RLE8)
1940 {
1941 DPRINT1("no compressed format allowed\n");
1942 return (HBITMAP)NULL;
1943 }
1944
1945 effHeight = bi->biHeight >= 0 ? bi->biHeight : -bi->biHeight;
1946 bm.bmType = 0;
1947 bm.bmWidth = bi->biWidth;
1948 bm.bmHeight = effHeight;
1949 bm.bmWidthBytes = ovr_pitch ? ovr_pitch : WIDTH_BYTES_ALIGN32(bm.bmWidth, bi->biBitCount);
1950
1951 bm.bmPlanes = bi->biPlanes;
1952 bm.bmBitsPixel = bi->biBitCount;
1953 bm.bmBits = NULL;
1954
1955 // Get storage location for DIB bits. Only use biSizeImage if it's valid and
1956 // we're dealing with a compressed bitmap. Otherwise, use width * height.
1957 totalSize = (bi->biSizeImage && (bi->biCompression != BI_RGB) && (bi->biCompression != BI_BITFIELDS))
1958 ? bi->biSizeImage : (ULONG)(bm.bmWidthBytes * effHeight);
1959
1960 if (section)
1961 {
1964 DWORD mapOffset;
1966 SIZE_T mapSize;
1967
1969 &Sbi,
1970 sizeof Sbi,
1971 0);
1972 if (!NT_SUCCESS(Status))
1973 {
1974 DPRINT1("ZwQuerySystemInformation failed (0x%lx)\n", Status);
1975 return NULL;
1976 }
1977
1978 mapOffset = offset - (offset % Sbi.AllocationGranularity);
1979 mapSize = totalSize + (offset - mapOffset);
1980
1981 SectionOffset.LowPart = mapOffset;
1982 SectionOffset.HighPart = 0;
1983
1984 Status = ZwMapViewOfSection(section,
1986 &mapBits,
1987 0,
1988 0,
1990 &mapSize,
1991 ViewShare,
1992 0,
1994 if (!NT_SUCCESS(Status))
1995 {
1996 DPRINT1("ZwMapViewOfSection failed (0x%lx)\n", Status);
1998 return NULL;
1999 }
2000
2001 if (mapBits) bm.bmBits = (char *)mapBits + (offset - mapOffset);
2002 }
2003 else if (ovr_pitch && offset)
2004 bm.bmBits = UlongToPtr(offset);
2005 else
2006 {
2007 offset = 0;
2008 bm.bmBits = EngAllocUserMem(totalSize, 0);
2009 if(!bm.bmBits)
2010 {
2011 DPRINT1("Failed to allocate memory\n");
2012 goto cleanup;
2013 }
2014 }
2015
2016// hSecure = MmSecureVirtualMemory(bm.bmBits, totalSize, PAGE_READWRITE);
2017 hSecure = (HANDLE)0x1; // HACK OF UNIMPLEMENTED KERNEL STUFF !!!!
2018
2019 // Create Device Dependent Bitmap and add DIB pointer
2020 //Size.cx = bm.bmWidth;
2021 //Size.cy = abs(bm.bmHeight);
2022 res = GreCreateBitmapEx(bm.bmWidth,
2023 abs(bm.bmHeight),
2024 bm.bmWidthBytes,
2025 BitmapFormat(bi->biBitCount * bi->biPlanes, bi->biCompression),
2027 ((bi->biHeight < 0) ? BMF_TOPDOWN : 0),
2028 totalSize,
2029 bm.bmBits,
2030 0);
2031 if (!res)
2032 {
2033 DPRINT1("GreCreateBitmapEx failed\n");
2035 goto cleanup;
2036 }
2037 bmp = SURFACE_ShareLockSurface(res); // HACK
2038 if (NULL == bmp)
2039 {
2040 DPRINT1("SURFACE_LockSurface failed\n");
2042 goto cleanup;
2043 }
2044
2045 /* WINE NOTE: WINE makes use of a colormap, which is a color translation
2046 table between the DIB and the X physical device. Obviously,
2047 this is left out of the ReactOS implementation. Instead,
2048 we call NtGdiSetDIBColorTable. */
2049 bmp->hDIBSection = section;
2050 bmp->hSecure = hSecure;
2051 bmp->dwOffset = offset;
2052 bmp->flags = API_BITMAP;
2053 bmp->biClrImportant = bi->biClrImportant;
2054
2055 /* Create a palette for the DIB */
2056 ppalDIB = CreateDIBPalette(bmi, dc, usage);
2057
2058 // Clean up in case of errors
2059cleanup:
2060 if (!res || !bmp || !bm.bmBits || !ppalDIB)
2061 {
2062 DPRINT("Got an error res=%p, bmp=%p, bm.bmBits=%p\n", res, bmp, bm.bmBits);
2063 if (bm.bmBits)
2064 {
2065 // MmUnsecureVirtualMemory(hSecure); // FIXME: Implement this!
2066 if (section)
2067 {
2068 ZwUnmapViewOfSection(NtCurrentProcess(), mapBits);
2069 bm.bmBits = NULL;
2070 }
2071 else if (!offset)
2072 EngFreeUserMem(bm.bmBits), bm.bmBits = NULL;
2073 }
2074
2075 if (bmp)
2076 {
2078 bmp = NULL;
2079 }
2080
2081 if (res)
2082 {
2084 res = 0;
2085 }
2086
2087 if(ppalDIB)
2088 {
2090 }
2091 }
2092
2093 if (bmp)
2094 {
2095 /* If we're here, everything went fine */
2096 SURFACE_vSetPalette(bmp, ppalDIB);
2099 }
2100
2101 // Return BITMAP handle and storage location
2102 if (NULL != bm.bmBits && NULL != bits)
2103 {
2104 *bits = bm.bmBits;
2105 }
2106
2107 return res;
2108}
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:57
#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:73
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:22
#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 2302 of file dibobj.c.

2303{
2304 BITMAPCOREINFO* pbmci;
2305 if(converted == orig)
2306 return;
2307
2308 if(usage == -1)
2309 {
2310 /* Caller don't want any conversion */
2311 ExFreePoolWithTag(converted, TAG_DIB);
2312 return;
2313 }
2314
2315 /* Perform inverse conversion */
2316 pbmci = (BITMAPCOREINFO*)orig;
2317
2318 ASSERT(pbmci->bmciHeader.bcSize == sizeof(BITMAPCOREHEADER));
2319 pbmci->bmciHeader.bcBitCount = converted->bmiHeader.biBitCount;
2320 pbmci->bmciHeader.bcWidth = converted->bmiHeader.biWidth;
2321 pbmci->bmciHeader.bcHeight = converted->bmiHeader.biHeight;
2322 pbmci->bmciHeader.bcPlanes = converted->bmiHeader.biPlanes;
2323
2324 if(pbmci->bmciHeader.bcBitCount <= 8)
2325 {
2326 UINT numColors = converted->bmiHeader.biClrUsed;
2327 if(!numColors) numColors = 1 << pbmci->bmciHeader.bcBitCount;
2328 if(usage == DIB_PAL_COLORS)
2329 {
2330 RtlZeroMemory(pbmci->bmciColors, (1 << pbmci->bmciHeader.bcBitCount) * sizeof(WORD));
2331 RtlCopyMemory(pbmci->bmciColors, converted->bmiColors, numColors * sizeof(WORD));
2332 }
2333 else
2334 {
2335 UINT i;
2336 RtlZeroMemory(pbmci->bmciColors, (1 << pbmci->bmciHeader.bcBitCount) * sizeof(RGBTRIPLE));
2337 for(i=0; i<numColors; i++)
2338 {
2339 pbmci->bmciColors[i].rgbtRed = converted->bmiColors[i].rgbRed;
2340 pbmci->bmciColors[i].rgbtGreen = converted->bmiColors[i].rgbGreen;
2341 pbmci->bmciColors[i].rgbtBlue = converted->bmiColors[i].rgbBlue;
2342 }
2343 }
2344 }
2345 /* Now free it, it's not needed anymore */
2346 ExFreePoolWithTag(converted, TAG_DIB);
2347}
#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 2118 of file dibobj.c.

2120{
2121 if (header->biSize == sizeof(BITMAPCOREHEADER))
2122 {
2123 const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)header;
2124 *width = core->bcWidth;
2125 *height = core->bcHeight;
2126 *planes = core->bcPlanes;
2127 *bpp = core->bcBitCount;
2128 *compr = BI_RGB;
2129 *size = 0;
2130 return 0;
2131 }
2132 if (header->biSize >= sizeof(BITMAPINFOHEADER)) /* Assume BITMAPINFOHEADER */
2133 {
2134 *width = header->biWidth;
2135 *height = header->biHeight;
2136 *planes = header->biPlanes;
2137 *bpp = header->biBitCount;
2138 *compr = header->biCompression;
2139 *size = header->biSizeImage;
2140 return 1;
2141 }
2142 DPRINT1("(%u): unknown/wrong size for header\n", header->biSize );
2143 return -1;
2144}
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 2153 of file dibobj.c.

2154{
2155 return WIDTH_BYTES_ALIGN32(width, depth) * (height < 0 ? -height : height);
2156}
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 2194 of file dibobj.c.

2195{
2196 PPALETTE ppalNew;
2197 ULONG nNumColors,i;
2198 USHORT *lpIndex;
2199 HPALETTE hpal;
2200
2201 if (!(ppalDc->flFlags & PAL_INDEXED))
2202 {
2203 return NULL;
2204 }
2205
2206 nNumColors = 1 << lpbmi->bmiHeader.biBitCount;
2207 if (lpbmi->bmiHeader.biClrUsed)
2208 {
2209 nNumColors = min(nNumColors, lpbmi->bmiHeader.biClrUsed);
2210 }
2211
2212 ppalNew = PALETTE_AllocPalWithHandle(PAL_INDEXED, nNumColors, NULL, 0, 0, 0);
2213 if (ppalNew == NULL)
2214 {
2215 DPRINT1("Could not allocate palette\n");
2216 return NULL;
2217 }
2218
2219 lpIndex = (USHORT *)((PBYTE)lpbmi + lpbmi->bmiHeader.biSize);
2220
2221 for (i = 0; i < nNumColors; i++)
2222 {
2223 ULONG iColorIndex = *lpIndex % ppalDc->NumColors;
2224 ppalNew->IndexedColors[i] = ppalDc->IndexedColors[iColorIndex];
2225 lpIndex++;
2226 }
2227
2228 hpal = ppalNew->BaseObject.hHmgr;
2229 PALETTE_UnlockPalette(ppalNew);
2230
2231 return hpal;
2232}
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 1794 of file dibobj.c.

1798{
1800 PBYTE pjBits;
1801 UINT cjInfo, cjBits;
1802 HBITMAP hbm;
1803
1804 /* We only support BITMAPINFOHEADER, make sure the size is ok */
1805 if (cjPackedDIB < sizeof(BITMAPINFOHEADER))
1806 {
1807 return NULL;
1808 }
1809
1810 /* The packed DIB starts with the BITMAPINFOHEADER */
1811 pbmi = pvPackedDIB;
1812
1813 if (cjPackedDIB < pbmi->bmiHeader.biSize)
1814 {
1815 return NULL;
1816 }
1817
1818 /* Calculate the info size and make sure the packed DIB is large enough */
1819 cjInfo = DIB_BitmapInfoSize(pbmi, uUsage);
1820 if (cjPackedDIB <= cjInfo)
1821 {
1822 return NULL;
1823 }
1824
1825 /* The bitmap bits start after the header */
1826 pjBits = (PBYTE)pvPackedDIB + cjInfo;
1827 cjBits = cjPackedDIB - cjInfo;
1828
1833 pjBits,
1834 pbmi,
1835 uUsage,
1836 0,
1837 cjBits,
1838 NULL);
1839
1840 return hbm;
1841}
#define CBM_CREATDIB
INT FASTCALL DIB_BitmapInfoSize(const BITMAPINFO *info, WORD coloruse)
Definition: dibobj.c:2165
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:1718
_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 717 of file dibobj.c.

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