Added CreateDIBPatternBrushPt (GDI32.35) with minor documentation

updates.
This commit is contained in:
Jeff Johann 1998-11-08 15:07:22 +00:00 committed by Alexandre Julliard
parent 194cfed110
commit 471b5dff8d
2 changed files with 60 additions and 2 deletions

View File

@ -132,8 +132,22 @@ HBRUSH16 WINAPI CreateDIBPatternBrush16( HGLOBAL16 hbitmap, UINT16 coloruse )
/*********************************************************************** /***********************************************************************
* CreateDIBPatternBrush32 (GDI32.34) * 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 }; LOGBRUSH32 logbrush = { BS_DIBPATTERN, coloruse, 0 };
BITMAPINFO *info, *newInfo; BITMAPINFO *info, *newInfo;
@ -165,6 +179,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) * CreateSolidBrush (GDI.66)
*/ */

View File

@ -37,7 +37,7 @@ init MAIN_GdiInit
32 stdcall CreateDCA(str str str ptr) CreateDC32A 32 stdcall CreateDCA(str str str ptr) CreateDC32A
33 stdcall CreateDCW(wstr wstr wstr ptr) CreateDC32W 33 stdcall CreateDCW(wstr wstr wstr ptr) CreateDC32W
34 stdcall CreateDIBPatternBrush(long long) CreateDIBPatternBrush32 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 36 stdcall CreateDIBSection(long ptr long ptr long long) CreateDIBSection32
37 stdcall CreateDIBitmap(long ptr long ptr ptr long) CreateDIBitmap32 37 stdcall CreateDIBitmap(long ptr long ptr ptr long) CreateDIBitmap32
38 stdcall CreateDiscardableBitmap(long long long) CreateDiscardableBitmap32 38 stdcall CreateDiscardableBitmap(long long long) CreateDiscardableBitmap32