Commit 471b5dff authored by Jeff Johann's avatar Jeff Johann Committed by Alexandre Julliard

Added CreateDIBPatternBrushPt (GDI32.35) with minor documentation

updates.
parent 194cfed1
......@@ -132,8 +132,22 @@ HBRUSH16 WINAPI CreateDIBPatternBrush16( HGLOBAL16 hbitmap, UINT16 coloruse )
/***********************************************************************
* CreateDIBPatternBrush32 (GDI32.34)
*
* Create a logical brush which has the pattern specified by the DIB
*
* Function call is for compatability only. CreateDIBPatternBrushPt should be used.
*
* RETURNS
*
* Handle to a logical brush on success, NULL on failure.
*
* BUGS
*
*/
HBRUSH32 WINAPI CreateDIBPatternBrush32( HGLOBAL32 hbitmap, UINT32 coloruse )
HBRUSH32 WINAPI CreateDIBPatternBrush32(
HGLOBAL32 hbitmap, /* Global object containg BITMAPINFO structure */
UINT32 coloruse /* Specifies color format, if provided */
)
{
LOGBRUSH32 logbrush = { BS_DIBPATTERN, coloruse, 0 };
BITMAPINFO *info, *newInfo;
......@@ -166,6 +180,50 @@ HBRUSH32 WINAPI CreateDIBPatternBrush32( HGLOBAL32 hbitmap, UINT32 coloruse )
/***********************************************************************
* CreateDIBPatternBrushPt32 (GDI32.35)
*
* Create a logical brush which has the pattern specified by the DIB
*
* RETURNS
*
* Handle to a logical brush on success, NULL on failure.
*
* BUGS
*
*/
HBRUSH32 WINAPI CreateDIBPatternBrushPt32(
BITMAPINFO *info, /* Pointer to a BITMAPINFO structure */
UINT32 coloruse /* Specifies color format, if provided */
)
{
LOGBRUSH32 logbrush = { BS_DIBPATTERN, coloruse, 0 };
BITMAPINFO *newInfo;
INT32 size;
TRACE(gdi, "%04x\n", info );
/* Make a copy of the bitmap */
if (info->bmiHeader.biCompression)
size = info->bmiHeader.biSizeImage;
else
size = (info->bmiHeader.biWidth * info->bmiHeader.biBitCount + 31) / 32
* 8 * info->bmiHeader.biHeight;
size += DIB_BitmapInfoSize( info, coloruse );
if (!(logbrush.lbHatch = (INT32)GlobalAlloc16( GMEM_MOVEABLE, size )))
{
return 0;
}
newInfo = (BITMAPINFO *) GlobalLock16( (HGLOBAL16)logbrush.lbHatch );
memcpy( newInfo, info, size );
GlobalUnlock16( (HGLOBAL16)logbrush.lbHatch );
return CreateBrushIndirect32( &logbrush );
}
/***********************************************************************
* CreateSolidBrush (GDI.66)
*/
HBRUSH16 WINAPI CreateSolidBrush16( COLORREF color )
......
......@@ -37,7 +37,7 @@ init MAIN_GdiInit
32 stdcall CreateDCA(str str str ptr) CreateDC32A
33 stdcall CreateDCW(wstr wstr wstr ptr) CreateDC32W
34 stdcall CreateDIBPatternBrush(long long) CreateDIBPatternBrush32
35 stub CreateDIBPatternBrushPt
35 stdcall CreateDIBPatternBrushPt(long long) CreateDIBPatternBrushPt32
36 stdcall CreateDIBSection(long ptr long ptr long long) CreateDIBSection32
37 stdcall CreateDIBitmap(long ptr long ptr ptr long) CreateDIBitmap32
38 stdcall CreateDiscardableBitmap(long long long) CreateDiscardableBitmap32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment