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
75f792d7
Commit
75f792d7
authored
Mar 10, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add null driver entry points for SetDCBrush/PenColor.
parent
92859157
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
45 deletions
+16
-45
dc.c
dlls/gdi32/dc.c
+4
-43
driver.c
dlls/gdi32/driver.c
+12
-2
No files found.
dlls/gdi32/dc.c
View file @
75f792d7
...
@@ -2011,10 +2011,6 @@ DWORD WINAPI SetLayout(HDC hdc, DWORD layout)
...
@@ -2011,10 +2011,6 @@ DWORD WINAPI SetLayout(HDC hdc, DWORD layout)
/***********************************************************************
/***********************************************************************
* GetDCBrushColor (GDI32.@)
* GetDCBrushColor (GDI32.@)
*
* Retrieves the current brush color for the specified device
* context (DC).
*
*/
*/
COLORREF
WINAPI
GetDCBrushColor
(
HDC
hdc
)
COLORREF
WINAPI
GetDCBrushColor
(
HDC
hdc
)
{
{
...
@@ -2035,11 +2031,6 @@ COLORREF WINAPI GetDCBrushColor(HDC hdc)
...
@@ -2035,11 +2031,6 @@ COLORREF WINAPI GetDCBrushColor(HDC hdc)
/***********************************************************************
/***********************************************************************
* SetDCBrushColor (GDI32.@)
* SetDCBrushColor (GDI32.@)
*
* Sets the current device context (DC) brush color to the specified
* color value. If the device cannot represent the specified color
* value, the color is set to the nearest physical color.
*
*/
*/
COLORREF
WINAPI
SetDCBrushColor
(
HDC
hdc
,
COLORREF
crColor
)
COLORREF
WINAPI
SetDCBrushColor
(
HDC
hdc
,
COLORREF
crColor
)
{
{
...
@@ -2051,23 +2042,13 @@ COLORREF WINAPI SetDCBrushColor(HDC hdc, COLORREF crColor)
...
@@ -2051,23 +2042,13 @@ COLORREF WINAPI SetDCBrushColor(HDC hdc, COLORREF crColor)
dc
=
get_dc_ptr
(
hdc
);
dc
=
get_dc_ptr
(
hdc
);
if
(
dc
)
if
(
dc
)
{
{
if
(
dc
->
funcs
->
pSetDCBrushColor
)
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSetDCBrushColor
);
crColor
=
dc
->
funcs
->
pSetDCBrushColor
(
dc
->
physDev
,
crColor
);
crColor
=
physdev
->
funcs
->
pSetDCBrushColor
(
physdev
,
crColor
);
else
if
(
dc
->
hBrush
==
GetStockObject
(
DC_BRUSH
))
{
/* If DC_BRUSH is selected, update driver pen color */
HBRUSH
hBrush
=
CreateSolidBrush
(
crColor
);
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBrush
);
physdev
->
funcs
->
pSelectBrush
(
physdev
,
hBrush
);
DeleteObject
(
hBrush
);
}
if
(
crColor
!=
CLR_INVALID
)
if
(
crColor
!=
CLR_INVALID
)
{
{
oldClr
=
dc
->
dcBrushColor
;
oldClr
=
dc
->
dcBrushColor
;
dc
->
dcBrushColor
=
crColor
;
dc
->
dcBrushColor
=
crColor
;
}
}
release_dc_ptr
(
dc
);
release_dc_ptr
(
dc
);
}
}
...
@@ -2076,10 +2057,6 @@ COLORREF WINAPI SetDCBrushColor(HDC hdc, COLORREF crColor)
...
@@ -2076,10 +2057,6 @@ COLORREF WINAPI SetDCBrushColor(HDC hdc, COLORREF crColor)
/***********************************************************************
/***********************************************************************
* GetDCPenColor (GDI32.@)
* GetDCPenColor (GDI32.@)
*
* Retrieves the current pen color for the specified device
* context (DC).
*
*/
*/
COLORREF
WINAPI
GetDCPenColor
(
HDC
hdc
)
COLORREF
WINAPI
GetDCPenColor
(
HDC
hdc
)
{
{
...
@@ -2100,11 +2077,6 @@ COLORREF WINAPI GetDCPenColor(HDC hdc)
...
@@ -2100,11 +2077,6 @@ COLORREF WINAPI GetDCPenColor(HDC hdc)
/***********************************************************************
/***********************************************************************
* SetDCPenColor (GDI32.@)
* SetDCPenColor (GDI32.@)
*
* Sets the current device context (DC) pen color to the specified
* color value. If the device cannot represent the specified color
* value, the color is set to the nearest physical color.
*
*/
*/
COLORREF
WINAPI
SetDCPenColor
(
HDC
hdc
,
COLORREF
crColor
)
COLORREF
WINAPI
SetDCPenColor
(
HDC
hdc
,
COLORREF
crColor
)
{
{
...
@@ -2116,24 +2088,13 @@ COLORREF WINAPI SetDCPenColor(HDC hdc, COLORREF crColor)
...
@@ -2116,24 +2088,13 @@ COLORREF WINAPI SetDCPenColor(HDC hdc, COLORREF crColor)
dc
=
get_dc_ptr
(
hdc
);
dc
=
get_dc_ptr
(
hdc
);
if
(
dc
)
if
(
dc
)
{
{
if
(
dc
->
funcs
->
pSetDCPenColor
)
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSetDCPenColor
);
crColor
=
dc
->
funcs
->
pSetDCPenColor
(
dc
->
physDev
,
crColor
);
crColor
=
physdev
->
funcs
->
pSetDCPenColor
(
physdev
,
crColor
);
else
if
(
dc
->
hPen
==
GetStockObject
(
DC_PEN
))
{
/* If DC_PEN is selected, update the driver pen color */
LOGPEN
logpen
=
{
PS_SOLID
,
{
0
,
0
},
crColor
};
HPEN
hPen
=
CreatePenIndirect
(
&
logpen
);
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectPen
);
physdev
->
funcs
->
pSelectPen
(
physdev
,
hPen
);
DeleteObject
(
hPen
);
}
if
(
crColor
!=
CLR_INVALID
)
if
(
crColor
!=
CLR_INVALID
)
{
{
oldClr
=
dc
->
dcPenColor
;
oldClr
=
dc
->
dcPenColor
;
dc
->
dcPenColor
=
crColor
;
dc
->
dcPenColor
=
crColor
;
}
}
release_dc_ptr
(
dc
);
release_dc_ptr
(
dc
);
}
}
...
...
dlls/gdi32/driver.c
View file @
75f792d7
...
@@ -438,6 +438,16 @@ static HPEN CDECL nulldrv_SelectPen( PHYSDEV dev, HPEN pen )
...
@@ -438,6 +438,16 @@ static HPEN CDECL nulldrv_SelectPen( PHYSDEV dev, HPEN pen )
return
pen
;
return
pen
;
}
}
static
COLORREF
CDECL
nulldrv_SetDCBrushColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
return
color
;
}
static
COLORREF
CDECL
nulldrv_SetDCPenColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
return
color
;
}
static
void
CDECL
nulldrv_SetDeviceClipping
(
PHYSDEV
dev
,
HRGN
vis_rgn
,
HRGN
clip_rgn
)
static
void
CDECL
nulldrv_SetDeviceClipping
(
PHYSDEV
dev
,
HRGN
vis_rgn
,
HRGN
clip_rgn
)
{
{
}
}
...
@@ -606,8 +616,8 @@ const DC_FUNCTIONS null_driver =
...
@@ -606,8 +616,8 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pSetBitmapBits */
NULL
,
/* pSetBitmapBits */
NULL
,
/* pSetBkColor */
NULL
,
/* pSetBkColor */
NULL
,
/* pSetBkMode */
NULL
,
/* pSetBkMode */
NULL
,
/* pSetDCBrushColor */
nulldrv_SetDCBrushColor
,
/* pSetDCBrushColor */
NULL
,
/* pSetDCPenColor */
nulldrv_SetDCPenColor
,
/* pSetDCPenColor */
NULL
,
/* pSetDIBColorTable */
NULL
,
/* pSetDIBColorTable */
NULL
,
/* pSetDIBits */
NULL
,
/* pSetDIBits */
NULL
,
/* pSetDIBitsToDevice */
NULL
,
/* pSetDIBitsToDevice */
...
...
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