mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:03:12 +00:00
[GDI32|Metafile]
- Instead of debug breaking, use wine code anyway. Should fix CORE-12911. svn path=/trunk/; revision=75016
This commit is contained in:
parent
07e4b2cd19
commit
4d11c54f65
1 changed files with 22 additions and 2 deletions
|
@ -402,13 +402,33 @@ GDI_hdc_not_using_object(
|
||||||
ASSERT(hdcLink == hdc);
|
ASSERT(hdcLink == hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* bitmap_info_size
|
||||||
|
*
|
||||||
|
* Return the size of the bitmap info structure including color table.
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
bitmap_info_size(
|
bitmap_info_size(
|
||||||
const BITMAPINFO * info,
|
const BITMAPINFO * info,
|
||||||
WORD coloruse)
|
WORD coloruse)
|
||||||
{
|
{
|
||||||
__debugbreak();
|
unsigned int colors, size, masks = 0;
|
||||||
return 0;
|
|
||||||
|
if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
|
||||||
|
{
|
||||||
|
const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)info;
|
||||||
|
colors = (core->bcBitCount <= 8) ? 1 << core->bcBitCount : 0;
|
||||||
|
return sizeof(BITMAPCOREHEADER) + colors *
|
||||||
|
((coloruse == DIB_RGB_COLORS) ? sizeof(RGBTRIPLE) : sizeof(WORD));
|
||||||
|
}
|
||||||
|
else /* assume BITMAPINFOHEADER */
|
||||||
|
{
|
||||||
|
if (info->bmiHeader.biClrUsed) colors = min( info->bmiHeader.biClrUsed, 256 );
|
||||||
|
else colors = info->bmiHeader.biBitCount > 8 ? 0 : 1 << info->bmiHeader.biBitCount;
|
||||||
|
if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3;
|
||||||
|
size = max( info->bmiHeader.biSize, sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD) );
|
||||||
|
return size + colors * ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue