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
1a326f6c
Commit
1a326f6c
authored
Apr 11, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Handle EMR_POLYDRAW record in spool files.
parent
700f0c6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
0 deletions
+76
-0
printproc.c
dlls/wineps.drv/printproc.c
+76
-0
No files found.
dlls/wineps.drv/printproc.c
View file @
1a326f6c
...
...
@@ -624,6 +624,74 @@ static int plg_blt(PHYSDEV dev, const EMRPLGBLT *p)
return
TRUE
;
}
static
int
poly_draw
(
PHYSDEV
dev
,
const
POINT
*
points
,
const
BYTE
*
types
,
DWORD
count
)
{
POINT
first
,
cur
,
pts
[
4
];
DWORD
i
,
num_pts
;
/* check for valid point types */
for
(
i
=
0
;
i
<
count
;
i
++
)
{
switch
(
types
[
i
])
{
case
PT_MOVETO
:
case
PT_LINETO
|
PT_CLOSEFIGURE
:
case
PT_LINETO
:
break
;
case
PT_BEZIERTO
:
if
(
i
+
2
>=
count
)
return
FALSE
;
if
(
types
[
i
+
1
]
!=
PT_BEZIERTO
)
return
FALSE
;
if
((
types
[
i
+
2
]
&
~
PT_CLOSEFIGURE
)
!=
PT_BEZIERTO
)
return
FALSE
;
i
+=
2
;
break
;
default:
return
FALSE
;
}
}
GetCurrentPositionEx
(
dev
->
hdc
,
&
cur
);
first
=
cur
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
switch
(
types
[
i
])
{
case
PT_MOVETO
:
first
=
points
[
i
];
break
;
case
PT_LINETO
:
case
(
PT_LINETO
|
PT_CLOSEFIGURE
):
pts
[
0
]
=
cur
;
pts
[
1
]
=
points
[
i
];
num_pts
=
2
;
if
(
!
PSDRV_PolyPolyline
(
dev
,
pts
,
&
num_pts
,
1
))
return
FALSE
;
break
;
case
PT_BEZIERTO
:
pts
[
0
]
=
cur
;
pts
[
1
]
=
points
[
i
];
pts
[
2
]
=
points
[
i
+
1
];
pts
[
3
]
=
points
[
i
+
2
];
if
(
!
PSDRV_PolyBezier
(
dev
,
pts
,
4
))
return
FALSE
;
i
+=
2
;
break
;
}
cur
=
points
[
i
];
if
(
types
[
i
]
&
PT_CLOSEFIGURE
)
{
pts
[
0
]
=
cur
;
pts
[
1
]
=
first
;
num_pts
=
2
;
if
(
!
PSDRV_PolyPolyline
(
dev
,
pts
,
&
num_pts
,
1
))
return
FALSE
;
}
}
return
TRUE
;
}
static
int
WINAPI
hmf_proc
(
HDC
hdc
,
HANDLETABLE
*
htable
,
const
ENHMETARECORD
*
rec
,
int
n
,
LPARAM
arg
)
{
...
...
@@ -850,6 +918,14 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable,
}
return
ret
;
}
case
EMR_POLYDRAW
:
{
const
EMRPOLYDRAW
*
p
=
(
const
EMRPOLYDRAW
*
)
rec
;
const
POINT
*
pts
=
(
const
POINT
*
)
p
->
aptl
;
return
poly_draw
(
&
data
->
pdev
->
dev
,
pts
,
(
BYTE
*
)(
p
->
aptl
+
p
->
cptl
),
p
->
cptl
)
&&
MoveToEx
(
data
->
pdev
->
dev
.
hdc
,
pts
[
p
->
cptl
-
1
].
x
,
pts
[
p
->
cptl
-
1
].
y
,
NULL
);
}
case
EMR_PAINTRGN
:
{
const
EMRPAINTRGN
*
p
=
(
const
EMRPAINTRGN
*
)
rec
;
...
...
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