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
59f72abf
Commit
59f72abf
authored
Oct 05, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add partial support for creating EMREXTCREATEPEN records.
parent
428a1219
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
18 deletions
+33
-18
emfdc.c
dlls/gdi32/emfdc.c
+33
-18
No files found.
dlls/gdi32/emfdc.c
View file @
59f72abf
...
...
@@ -647,30 +647,45 @@ static BOOL emfdc_select_font( DC_ATTR *dc_attr, HFONT font )
return
emfdc_record
(
emf
,
&
emr
.
emr
);
}
static
DWORD
emfdc_
create_pen
(
struct
emf
*
emf
,
HPEN
hP
en
)
static
DWORD
emfdc_
ext_create_pen
(
struct
emf
*
emf
,
HPEN
p
en
)
{
EMRCREATEPEN
emr
;
DWORD
index
=
0
;
EMREXTCREATEPEN
*
emr
;
int
size
,
emr_size
;
DWORD
ret
=
0
;
if
(
!
GetObjectW
(
hPen
,
sizeof
(
emr
.
lopn
),
&
emr
.
lopn
))
{
/* must be an extended pen */
EXTLOGPEN
*
elp
;
INT
size
=
GetObjectW
(
hPen
,
0
,
NULL
);
if
(
!
(
size
=
GetObjectW
(
pen
,
0
,
NULL
)))
return
0
;
emr_size
=
sizeof
(
*
emr
)
-
sizeof
(
emr
->
elp
)
+
size
;
emr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
emr_size
);
if
(
!
emr
)
return
0
;
GetObjectW
(
pen
,
size
,
&
emr
->
elp
);
if
(
!
size
)
return
0
;
if
(
emr
->
elp
.
elpBrushStyle
==
BS_DIBPATTERN
||
emr
->
elp
.
elpBrushStyle
==
BS_DIBPATTERNPT
||
emr
->
elp
.
elpBrushStyle
==
BS_PATTERN
)
{
FIXME
(
"elpBrushStyle = %d
\n
"
,
emr
->
elp
.
elpBrushStyle
);
HeapFree
(
GetProcessHeap
(),
0
,
emr
);
return
0
;
}
emr
->
offBmi
=
emr
->
cbBmi
=
emr
->
offBits
=
emr
->
cbBits
=
0
;
elp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
emr
->
emr
.
iType
=
EMR_EXTCREATEPEN
;
emr
->
emr
.
nSize
=
emr_size
;
emr
->
ihPen
=
ret
=
emfdc_add_handle
(
emf
,
pen
);
ret
=
emfdc_record
(
emf
,
&
emr
->
emr
)
?
ret
:
0
;
HeapFree
(
GetProcessHeap
(),
0
,
emr
);
return
ret
;
}
GetObjectW
(
hPen
,
size
,
elp
);
/* FIXME: add support for user style pens */
emr
.
lopn
.
lopnStyle
=
elp
->
elpPenStyle
;
emr
.
lopn
.
lopnWidth
.
x
=
elp
->
elpWidth
;
emr
.
lopn
.
lopnWidth
.
y
=
0
;
emr
.
lopn
.
lopnColor
=
elp
->
elpColor
;
static
DWORD
emfdc_create_pen
(
struct
emf
*
emf
,
HPEN
hPen
)
{
EMRCREATEPEN
emr
;
DWORD
index
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
elp
);
}
if
(
!
GetObjectW
(
hPen
,
sizeof
(
emr
.
lopn
),
&
emr
.
lopn
))
return
emfdc_ext_create_pen
(
emf
,
hPen
);
emr
.
emr
.
iType
=
EMR_CREATEPEN
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
...
...
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