Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
572e0f01
Commit
572e0f01
authored
May 06, 2011
by
Huw Davies
Committed by
Alexandre Julliard
May 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Keep track of the background colour.
parent
4c859de0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
2 deletions
+47
-2
dc.c
dlls/gdi32/dibdrv/dc.c
+44
-2
gdi_private.h
dlls/gdi32/gdi_private.h
+3
-0
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
572e0f01
...
@@ -143,6 +143,46 @@ static HBITMAP CDECL dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
...
@@ -143,6 +143,46 @@ static HBITMAP CDECL dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
}
}
/***********************************************************************
/***********************************************************************
* dibdrv_SetBkColor
*/
static
COLORREF
CDECL
dibdrv_SetBkColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pSetBkColor
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
pdev
->
bkgnd_color
=
pdev
->
dib
.
funcs
->
colorref_to_pixel
(
&
pdev
->
dib
,
color
);
if
(
GetBkMode
(
dev
->
hdc
)
==
OPAQUE
)
calc_and_xor_masks
(
GetROP2
(
dev
->
hdc
),
pdev
->
bkgnd_color
,
&
pdev
->
bkgnd_and
,
&
pdev
->
bkgnd_xor
);
else
{
pdev
->
bkgnd_and
=
~
0u
;
pdev
->
bkgnd_xor
=
0
;
}
return
next
->
funcs
->
pSetBkColor
(
next
,
color
);
}
/***********************************************************************
* dibdrv_SetBkMode
*/
static
INT
CDECL
dibdrv_SetBkMode
(
PHYSDEV
dev
,
INT
mode
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pSetBkMode
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
if
(
mode
==
OPAQUE
)
calc_and_xor_masks
(
GetROP2
(
dev
->
hdc
),
pdev
->
bkgnd_color
,
&
pdev
->
bkgnd_and
,
&
pdev
->
bkgnd_xor
);
else
{
pdev
->
bkgnd_and
=
~
0u
;
pdev
->
bkgnd_xor
=
0
;
}
return
next
->
funcs
->
pSetBkMode
(
next
,
mode
);
}
/***********************************************************************
* dibdrv_SetDeviceClipping
* dibdrv_SetDeviceClipping
*/
*/
static
void
CDECL
dibdrv_SetDeviceClipping
(
PHYSDEV
dev
,
HRGN
vis_rgn
,
HRGN
clip_rgn
)
static
void
CDECL
dibdrv_SetDeviceClipping
(
PHYSDEV
dev
,
HRGN
vis_rgn
,
HRGN
clip_rgn
)
...
@@ -165,6 +205,8 @@ static INT CDECL dibdrv_SetROP2( PHYSDEV dev, INT rop )
...
@@ -165,6 +205,8 @@ static INT CDECL dibdrv_SetROP2( PHYSDEV dev, INT rop )
calc_and_xor_masks
(
rop
,
pdev
->
pen_color
,
&
pdev
->
pen_and
,
&
pdev
->
pen_xor
);
calc_and_xor_masks
(
rop
,
pdev
->
pen_color
,
&
pdev
->
pen_and
,
&
pdev
->
pen_xor
);
update_brush_rop
(
pdev
,
rop
);
update_brush_rop
(
pdev
,
rop
);
if
(
GetBkMode
(
dev
->
hdc
)
==
OPAQUE
)
calc_and_xor_masks
(
rop
,
pdev
->
bkgnd_color
,
&
pdev
->
bkgnd_and
,
&
pdev
->
bkgnd_xor
);
return
next
->
funcs
->
pSetROP2
(
next
,
rop
);
return
next
->
funcs
->
pSetROP2
(
next
,
rop
);
}
}
...
@@ -254,8 +296,8 @@ const DC_FUNCTIONS dib_driver =
...
@@ -254,8 +296,8 @@ const DC_FUNCTIONS dib_driver =
dibdrv_SelectPen
,
/* pSelectPen */
dibdrv_SelectPen
,
/* pSelectPen */
NULL
,
/* pSetArcDirection */
NULL
,
/* pSetArcDirection */
NULL
,
/* pSetBitmapBits */
NULL
,
/* pSetBitmapBits */
NULL
,
/* pSetBkColor */
dibdrv_SetBkColor
,
/* pSetBkColor */
NULL
,
/* pSetBkMode */
dibdrv_SetBkMode
,
/* pSetBkMode */
dibdrv_SetDCBrushColor
,
/* pSetDCBrushColor */
dibdrv_SetDCBrushColor
,
/* pSetDCBrushColor */
dibdrv_SetDCPenColor
,
/* pSetDCPenColor */
dibdrv_SetDCPenColor
,
/* pSetDCPenColor */
NULL
,
/* pSetDIBColorTable */
NULL
,
/* pSetDIBColorTable */
...
...
dlls/gdi32/gdi_private.h
View file @
572e0f01
...
@@ -108,6 +108,9 @@ typedef struct dibdrv_physdev
...
@@ -108,6 +108,9 @@ typedef struct dibdrv_physdev
UINT
brush_style
;
UINT
brush_style
;
DWORD
brush_color
,
brush_and
,
brush_xor
;
DWORD
brush_color
,
brush_and
,
brush_xor
;
BOOL
(
*
brush_rects
)(
struct
dibdrv_physdev
*
pdev
,
int
num
,
RECT
*
rects
);
BOOL
(
*
brush_rects
)(
struct
dibdrv_physdev
*
pdev
,
int
num
,
RECT
*
rects
);
/* background */
DWORD
bkgnd_color
,
bkgnd_and
,
bkgnd_xor
;
}
dibdrv_physdev
;
}
dibdrv_physdev
;
#define DEFER_FORMAT 1
#define DEFER_FORMAT 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment