On Sat Nov 16 12:02:41 2024 +0000, Jinoh Kang wrote:
Monochrome bitmaps are not always black and white when blitted to a colored DC. Have you checked if the colors should be in fact {GetTextColor(), GetBgColor()}? Should we respect their palettes just like in the default case, if they have any? Wouldn't this cause regression in that case?
Yes, you are right. Setting colors to black and white isn't correct.
In my case monochrome bitmap is a mask for removing background on other bitmap. Probably, I need to set the palette before making a bitblt for the mask. Then the default case should work as you said.
But what confuses me is that in Windows the palette setting is not required. And also, when rendering in Wine (not in the EMF context), bitblt works as expected without palette setting.
Unfortunately, I can't determine the reasons for this now. I should to figure out how bitblt works in non-EMF contexts