libfreerdp-gdi: fix minor color background bug with glyph drawing

This commit is contained in:
Marc-André Moreau 2012-01-08 18:19:04 -05:00
parent eb2c9969e8
commit 05dd50c97a

View File

@ -186,10 +186,11 @@ void gdi_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int heigh
HGDI_BRUSH brush;
rdpGdi* gdi = context->gdi;
bgcolor = freerdp_color_convert_rgb(bgcolor, gdi->srcBpp, 32, gdi->clrconv);
fgcolor = freerdp_color_convert_rgb(fgcolor, gdi->srcBpp, 32, gdi->clrconv);
bgcolor = freerdp_color_convert_var_bgr(bgcolor, gdi->srcBpp, 32, gdi->clrconv);
fgcolor = freerdp_color_convert_var_bgr(fgcolor, gdi->srcBpp, 32, gdi->clrconv);
gdi_CRgnToRect(x, y, width, height, &rect);
brush = gdi_CreateSolidBrush(fgcolor);
gdi_FillRect(gdi->drawing->hdc, &rect, brush);
@ -201,7 +202,7 @@ void gdi_Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height,
{
rdpGdi* gdi = context->gdi;
bgcolor = freerdp_color_convert_rgb(bgcolor, gdi->srcBpp, 32, gdi->clrconv);
bgcolor = freerdp_color_convert_var_bgr(bgcolor, gdi->srcBpp, 32, gdi->clrconv);
gdi->textColor = gdi_SetTextColor(gdi->drawing->hdc, bgcolor);
}