gdi32: Keep track of the text pixel color.
This commit is contained in:
parent
6a629710ce
commit
15fabcdefe
|
@ -319,6 +319,7 @@ static void update_fg_colors( dibdrv_physdev *pdev )
|
||||||
{
|
{
|
||||||
pdev->pen_color = get_pixel_color( pdev, pdev->pen_colorref, TRUE );
|
pdev->pen_color = get_pixel_color( pdev, pdev->pen_colorref, TRUE );
|
||||||
pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE );
|
pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE );
|
||||||
|
pdev->text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_masks( dibdrv_physdev *pdev, INT rop )
|
static void update_masks( dibdrv_physdev *pdev, INT rop )
|
||||||
|
@ -518,6 +519,19 @@ static INT dibdrv_SetROP2( PHYSDEV dev, INT rop )
|
||||||
return next->funcs->pSetROP2( next, rop );
|
return next->funcs->pSetROP2( next, rop );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* dibdrv_SetTextColor
|
||||||
|
*/
|
||||||
|
static COLORREF dibdrv_SetTextColor( PHYSDEV dev, COLORREF color )
|
||||||
|
{
|
||||||
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetTextColor );
|
||||||
|
dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
|
||||||
|
|
||||||
|
pdev->text_color = get_pixel_color( pdev, color, TRUE );
|
||||||
|
|
||||||
|
return next->funcs->pSetTextColor( next, color );
|
||||||
|
}
|
||||||
|
|
||||||
const struct gdi_dc_funcs dib_driver =
|
const struct gdi_dc_funcs dib_driver =
|
||||||
{
|
{
|
||||||
NULL, /* pAbortDoc */
|
NULL, /* pAbortDoc */
|
||||||
|
@ -638,7 +652,7 @@ const struct gdi_dc_funcs dib_driver =
|
||||||
NULL, /* pSetStretchBltMode */
|
NULL, /* pSetStretchBltMode */
|
||||||
NULL, /* pSetTextAlign */
|
NULL, /* pSetTextAlign */
|
||||||
NULL, /* pSetTextCharacterExtra */
|
NULL, /* pSetTextCharacterExtra */
|
||||||
NULL, /* pSetTextColor */
|
dibdrv_SetTextColor, /* pSetTextColor */
|
||||||
NULL, /* pSetTextJustification */
|
NULL, /* pSetTextJustification */
|
||||||
NULL, /* pSetViewportExt */
|
NULL, /* pSetViewportExt */
|
||||||
NULL, /* pSetViewportOrg */
|
NULL, /* pSetViewportOrg */
|
||||||
|
|
|
@ -97,6 +97,9 @@ typedef struct dibdrv_physdev
|
||||||
|
|
||||||
/* background */
|
/* background */
|
||||||
DWORD bkgnd_color, bkgnd_and, bkgnd_xor;
|
DWORD bkgnd_color, bkgnd_and, bkgnd_xor;
|
||||||
|
|
||||||
|
/* text */
|
||||||
|
DWORD text_color;
|
||||||
} dibdrv_physdev;
|
} dibdrv_physdev;
|
||||||
|
|
||||||
#define DEFER_FORMAT 1
|
#define DEFER_FORMAT 1
|
||||||
|
|
Loading…
Reference in New Issue