Commit 9237638c authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Recompute the pen masks on every use to support PALETTEINDEX colors.

parent 43373c29
......@@ -259,13 +259,11 @@ DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bit
static void update_fg_colors( dibdrv_physdev *pdev )
{
pdev->pen_color = get_pixel_color( pdev, pdev->pen_colorref, TRUE );
pdev->text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE );
}
static void update_masks( dibdrv_physdev *pdev, INT rop )
{
calc_and_xor_masks( rop, pdev->pen_color, &pdev->pen_and, &pdev->pen_xor );
update_brush_rop( pdev, rop );
if( GetBkMode( pdev->dev.hdc ) == OPAQUE )
calc_and_xor_masks( rop, pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
......
......@@ -83,10 +83,11 @@ typedef struct dibdrv_physdev
/* pen */
COLORREF pen_colorref;
DWORD pen_color, pen_and, pen_xor, pen_endcap, pen_join;
DWORD pen_endcap, pen_join;
int pen_width;
dash_pattern pen_pattern;
dash_pos dash_pos;
rop_mask dash_masks[2];
BOOL (* pen_lines)(struct dibdrv_physdev *pdev, int num, POINT *pts, BOOL close);
/* brush */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment