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
f4d6b054
Commit
f4d6b054
authored
Mar 28, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Handle EMR_ANGLEARC record in spool files.
parent
dbf901a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
printproc.c
dlls/wineps.drv/printproc.c
+32
-0
No files found.
dlls/wineps.drv/printproc.c
View file @
f4d6b054
...
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <math.h>
#include <stdlib.h>
#include <windows.h>
...
...
@@ -131,6 +132,11 @@ static struct pp_data* get_handle_data(HANDLE pp)
return
ret
;
}
static
inline
INT
GDI_ROUND
(
double
val
)
{
return
(
int
)
floor
(
val
+
0
.
5
);
}
static
int
WINAPI
hmf_proc
(
HDC
hdc
,
HANDLETABLE
*
htable
,
const
ENHMETARECORD
*
rec
,
int
n
,
LPARAM
arg
)
{
...
...
@@ -242,6 +248,32 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable,
return
1
;
}
}
case
EMR_ANGLEARC
:
{
const
EMRANGLEARC
*
p
=
(
const
EMRANGLEARC
*
)
rec
;
int
arc_dir
=
SetArcDirection
(
data
->
pdev
->
dev
.
hdc
,
p
->
eSweepAngle
>=
0
?
AD_COUNTERCLOCKWISE
:
AD_CLOCKWISE
);
EMRARCTO
arcto
;
int
ret
;
arcto
.
emr
.
iType
=
EMR_ARCTO
;
arcto
.
rclBox
.
left
=
p
->
ptlCenter
.
x
-
p
->
nRadius
;
arcto
.
rclBox
.
top
=
p
->
ptlCenter
.
y
-
p
->
nRadius
;
arcto
.
rclBox
.
right
=
p
->
ptlCenter
.
x
+
p
->
nRadius
;
arcto
.
rclBox
.
bottom
=
p
->
ptlCenter
.
y
+
p
->
nRadius
;
arcto
.
ptlStart
.
x
=
GDI_ROUND
(
p
->
ptlCenter
.
x
+
cos
(
p
->
eStartAngle
*
M_PI
/
180
)
*
p
->
nRadius
);
arcto
.
ptlStart
.
y
=
GDI_ROUND
(
p
->
ptlCenter
.
y
-
sin
(
p
->
eStartAngle
*
M_PI
/
180
)
*
p
->
nRadius
);
arcto
.
ptlEnd
.
x
=
GDI_ROUND
(
p
->
ptlCenter
.
x
+
cos
((
p
->
eStartAngle
+
p
->
eSweepAngle
)
*
M_PI
/
180
)
*
p
->
nRadius
);
arcto
.
ptlEnd
.
y
=
GDI_ROUND
(
p
->
ptlCenter
.
y
-
sin
((
p
->
eStartAngle
+
p
->
eSweepAngle
)
*
M_PI
/
180
)
*
p
->
nRadius
);
ret
=
hmf_proc
(
hdc
,
htable
,
(
ENHMETARECORD
*
)
&
arcto
,
n
,
arg
);
SetArcDirection
(
data
->
pdev
->
dev
.
hdc
,
arc_dir
);
return
ret
;
}
case
EMR_ELLIPSE
:
{
const
EMRELLIPSE
*
p
=
(
const
EMRELLIPSE
*
)
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