Added support for alternate DIBBITBLT layout.

This commit is contained in:
Caolan McNamara 1999-03-13 12:47:36 +00:00 committed by Alexandre Julliard
parent 006efb357f
commit 8e5e588b8e
1 changed files with 24 additions and 6 deletions

View File

@ -907,12 +907,30 @@ void WINAPI PlayMetaFileRecord16(
case META_DIBBITBLT: case META_DIBBITBLT:
{ {
LPBITMAPINFO info = (LPBITMAPINFO) &(mr->rdParm[8]); /*In practice ive found that theres two layout for META_DIBBITBLT,
LPSTR bits = (LPSTR)info + DIB_BitmapInfoSize( info, mr->rdParm[0] ); one (the first here) is the usual one when a src dc is actually passed
StretchDIBits16(hdc,mr->rdParm[7],mr->rdParm[6],mr->rdParm[5], int, the second occurs when the src dc is passed in as NULL to
mr->rdParm[4],mr->rdParm[3],mr->rdParm[2], the creating BitBlt.
mr->rdParm[5],mr->rdParm[4],bits,info, as the second case has no dib, a size check will suffice to distinguish.
DIB_RGB_COLORS,MAKELONG(mr->rdParm[0],mr->rdParm[1]));
Caolan.McNamara@ul.ie
*/
if (mr->rdSize > 12)
{
LPBITMAPINFO info = (LPBITMAPINFO) &(mr->rdParm[8]);
LPSTR bits = (LPSTR)info + DIB_BitmapInfoSize( info, mr->rdParm[0] );
StretchDIBits16(hdc,mr->rdParm[7],mr->rdParm[6],mr->rdParm[5],
mr->rdParm[4],mr->rdParm[3],mr->rdParm[2],
mr->rdParm[5],mr->rdParm[4],bits,info,
DIB_RGB_COLORS,MAKELONG(mr->rdParm[0],mr->rdParm[1]));
}
else /*equivalent to a PatBlt*/
{
PatBlt16(hdc, mr->rdParm[8], mr->rdParm[7],
mr->rdParm[6], mr->rdParm[5],
MAKELONG(*(mr->rdParm), *(mr->rdParm + 1)));
}
} }
break; break;