Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c752e845
Commit
c752e845
authored
Apr 21, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use EMR_REALIZEPALETTE to record RealizePalette.
parent
3fdff0b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
dc.c
dlls/gdi32/dc.c
+4
-0
emfdc.c
dlls/gdi32/emfdc.c
+14
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
No files found.
dlls/gdi32/dc.c
View file @
c752e845
...
...
@@ -2153,7 +2153,11 @@ HPALETTE WINAPI SelectPalette( HDC hdc, HPALETTE palette, BOOL force_background
*/
UINT
WINAPI
RealizePalette
(
HDC
hdc
)
{
DC_ATTR
*
dc_attr
;
if
(
is_meta_dc
(
hdc
))
return
METADC_RealizePalette
(
hdc
);
if
(
!
(
dc_attr
=
get_dc_attr
(
hdc
)))
return
FALSE
;
if
(
dc_attr
->
emf
&&
!
EMFDC_RealizePalette
(
dc_attr
))
return
0
;
return
pfnRealizePalette
(
hdc
);
}
...
...
dlls/gdi32/emfdc.c
View file @
c752e845
...
...
@@ -696,6 +696,20 @@ BOOL EMFDC_SelectPalette( DC_ATTR *dc_attr, HPALETTE palette )
return
emfdc_record
(
emf
,
&
emr
.
emr
);
}
BOOL
EMFDC_RealizePalette
(
DC_ATTR
*
dc_attr
)
{
HPALETTE
palette
=
GetCurrentObject
(
dc_attr_handle
(
dc_attr
),
OBJ_PAL
);
struct
emf
*
emf
=
get_dc_emf
(
dc_attr
);
EMRREALIZEPALETTE
emr
;
if
(
palette
==
GetStockObject
(
DEFAULT_PALETTE
))
return
TRUE
;
emr
.
emr
.
iType
=
EMR_REALIZEPALETTE
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
return
emfdc_record
(
emf
,
&
emr
.
emr
);
}
BOOL
EMFDC_SelectObject
(
DC_ATTR
*
dc_attr
,
HGDIOBJ
obj
)
{
switch
(
gdi_handle_type
(
obj
))
...
...
dlls/gdi32/gdi_private.h
View file @
c752e845
...
...
@@ -225,6 +225,7 @@ extern BOOL EMFDC_PolyPolygon( DC_ATTR *dc_attr, const POINT *points, const INT
extern
BOOL
EMFDC_Polygon
(
DC_ATTR
*
dc_attr
,
const
POINT
*
points
,
INT
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDC_Polyline
(
DC_ATTR
*
dc_attr
,
const
POINT
*
points
,
INT
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDC_PolylineTo
(
DC_ATTR
*
dc_attr
,
const
POINT
*
points
,
INT
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDC_RealizePalette
(
DC_ATTR
*
dc_attr
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDC_Rectangle
(
DC_ATTR
*
dc_attr
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDC_RestoreDC
(
DC_ATTR
*
dc_attr
,
INT
level
)
DECLSPEC_HIDDEN
;
...
...
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