wineps: Use the correct colours when a monochrome bitmap without a colour table is the source.
This commit is contained in:
parent
90dfe084c6
commit
ad7e889c1d
|
@ -101,6 +101,7 @@ static BOOL PSDRV_WriteImageMaskHeader(PHYSDEV dev, const BITMAPINFO *info, INT
|
||||||
INT widthSrc, INT heightSrc)
|
INT widthSrc, INT heightSrc)
|
||||||
{
|
{
|
||||||
PSCOLOR bkgnd, foregnd;
|
PSCOLOR bkgnd, foregnd;
|
||||||
|
PSDRV_PDEVICE *physDev = get_psdrv_dev( dev );
|
||||||
|
|
||||||
assert(info->bmiHeader.biBitCount == 1);
|
assert(info->bmiHeader.biBitCount == 1);
|
||||||
|
|
||||||
|
@ -108,12 +109,20 @@ static BOOL PSDRV_WriteImageMaskHeader(PHYSDEV dev, const BITMAPINFO *info, INT
|
||||||
the foregnd color corresponds to a bit equal to
|
the foregnd color corresponds to a bit equal to
|
||||||
0 in the bitmap.
|
0 in the bitmap.
|
||||||
*/
|
*/
|
||||||
PSDRV_CreateColor(dev, &foregnd, RGB(info->bmiColors[0].rgbRed,
|
if (!info->bmiHeader.biClrUsed)
|
||||||
info->bmiColors[0].rgbGreen,
|
{
|
||||||
info->bmiColors[0].rgbBlue) );
|
PSDRV_CreateColor( dev, &foregnd, GetTextColor( dev->hdc ) );
|
||||||
PSDRV_CreateColor(dev, &bkgnd, RGB(info->bmiColors[1].rgbRed,
|
bkgnd = physDev->bkColor;
|
||||||
info->bmiColors[1].rgbGreen,
|
}
|
||||||
info->bmiColors[1].rgbBlue) );
|
else
|
||||||
|
{
|
||||||
|
PSDRV_CreateColor( dev, &foregnd, RGB(info->bmiColors[0].rgbRed,
|
||||||
|
info->bmiColors[0].rgbGreen,
|
||||||
|
info->bmiColors[0].rgbBlue) );
|
||||||
|
PSDRV_CreateColor( dev, &bkgnd, RGB(info->bmiColors[1].rgbRed,
|
||||||
|
info->bmiColors[1].rgbGreen,
|
||||||
|
info->bmiColors[1].rgbBlue) );
|
||||||
|
}
|
||||||
|
|
||||||
PSDRV_WriteGSave(dev);
|
PSDRV_WriteGSave(dev);
|
||||||
PSDRV_WriteNewPath(dev);
|
PSDRV_WriteNewPath(dev);
|
||||||
|
|
Loading…
Reference in New Issue