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
e92e5ec3
Commit
e92e5ec3
authored
Jun 17, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement ArcTo in enhanced metafiles.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bee56c33
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
6 deletions
+33
-6
enhmetafiledrv.h
dlls/gdi32/enhmfdrv/enhmetafiledrv.h
+2
-0
graphics.c
dlls/gdi32/enhmfdrv/graphics.c
+19
-0
init.c
dlls/gdi32/enhmfdrv/init.c
+1
-1
metafile.c
dlls/gdi32/tests/metafile.c
+11
-5
No files found.
dlls/gdi32/enhmfdrv/enhmetafiledrv.h
View file @
e92e5ec3
...
...
@@ -56,6 +56,8 @@ extern DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush ) DECLSPEC_H
extern
BOOL
EMFDRV_AbortPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDRV_Arc
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDRV_ArcTo
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDRV_BeginPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
EMFDRV_BitBlt
(
PHYSDEV
devDst
,
INT
xDst
,
INT
yDst
,
INT
width
,
INT
height
,
PHYSDEV
devSrc
,
INT
xSrc
,
INT
ySrc
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/enhmfdrv/graphics.c
View file @
e92e5ec3
...
...
@@ -177,6 +177,15 @@ EMFDRV_ArcChordPie( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
if
(
bounds
.
top
>
yCentre
)
bounds
.
top
=
yCentre
;
else
if
(
bounds
.
bottom
<
yCentre
)
bounds
.
bottom
=
yCentre
;
}
if
(
iType
==
EMR_ARCTO
)
{
POINT
pt
;
GetCurrentPositionEx
(
dev
->
hdc
,
&
pt
);
bounds
.
left
=
min
(
bounds
.
left
,
pt
.
x
);
bounds
.
top
=
min
(
bounds
.
top
,
pt
.
y
);
bounds
.
right
=
max
(
bounds
.
right
,
pt
.
x
);
bounds
.
bottom
=
max
(
bounds
.
bottom
,
pt
.
y
);
}
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
FALSE
;
if
(
!
physDev
->
path
)
...
...
@@ -196,6 +205,16 @@ BOOL EMFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
}
/***********************************************************************
* EMFDRV_ArcTo
*/
BOOL
EMFDRV_ArcTo
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
{
return
EMFDRV_ArcChordPie
(
dev
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
,
EMR_ARCTO
);
}
/***********************************************************************
* EMFDRV_Pie
*/
BOOL
EMFDRV_Pie
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
...
...
dlls/gdi32/enhmfdrv/init.c
View file @
e92e5ec3
...
...
@@ -41,7 +41,7 @@ static const struct gdi_dc_funcs EMFDRV_Funcs =
NULL
,
/* pAlphaBlend */
NULL
,
/* pAngleArc */
EMFDRV_Arc
,
/* pArc */
NULL
,
/* pArcTo */
EMFDRV_ArcTo
,
/* pArcTo */
EMFDRV_BeginPath
,
/* pBeginPath */
NULL
,
/* pBlendImage */
EMFDRV_Chord
,
/* pChord */
...
...
dlls/gdi32/tests/metafile.c
View file @
e92e5ec3
...
...
@@ -3599,12 +3599,12 @@ static const unsigned char EMF_PATH_BITS[] =
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x
ef
,
0xff
,
0xff
,
0xff
,
0xea
,
0xff
,
0xff
,
0xff
,
0x
d8
,
0xff
,
0xff
,
0xff
,
0xd8
,
0xff
,
0xff
,
0xff
,
0x20
,
0x45
,
0x4d
,
0x46
,
0x00
,
0x00
,
0x01
,
0x00
,
0x
0c
,
0x02
,
0x00
,
0x00
,
0x11
,
0x00
,
0x00
,
0x00
,
0x
34
,
0x02
,
0x00
,
0x00
,
0x12
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x
80
,
0x07
,
0x00
,
0x00
,
0x3e
,
0x04
,
0x00
,
0x00
,
0x
20
,
0x03
,
0x00
,
0x00
,
0x58
,
0x02
,
0x00
,
0x00
,
0x40
,
0x01
,
0x00
,
0x00
,
0xf0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xe2
,
0x04
,
0x00
,
...
...
@@ -3627,7 +3627,12 @@ static const unsigned char EMF_PATH_BITS[] =
0x15
,
0x00
,
0x00
,
0x00
,
0x26
,
0x00
,
0x00
,
0x00
,
0x1c
,
0x00
,
0x00
,
0x00
,
0x27
,
0x00
,
0x00
,
0x00
,
0x1d
,
0x00
,
0x00
,
0x00
,
0x15
,
0x00
,
0x00
,
0x00
,
0x15
,
0x00
,
0x00
,
0x00
,
0x2e
,
0x00
,
0x00
,
0x00
,
0x15
,
0x00
,
0x00
,
0x00
,
0x37
,
0x00
,
0x00
,
0x00
,
0x28
,
0x00
,
0x00
,
0x00
,
0x17
,
0x00
,
0x00
,
0x00
,
0x17
,
0x00
,
0x00
,
0x00
,
0x24
,
0x00
,
0x00
,
0x00
,
0x1a
,
0x00
,
0x00
,
0x00
,
0x25
,
0x00
,
0x00
,
0x00
,
0x1b
,
0x00
,
0x00
,
0x00
,
0x17
,
0x00
,
0x00
,
0x00
,
0x17
,
0x00
,
0x00
,
0x00
,
0x2e
,
0x00
,
0x00
,
0x00
,
0x28
,
0x00
,
0x00
,
0x00
,
0x15
,
0x00
,
0x00
,
0x00
,
0x15
,
0x00
,
0x00
,
0x00
,
0x26
,
0x00
,
0x00
,
0x00
,
0x1c
,
0x00
,
0x00
,
0x00
,
0x27
,
0x00
,
0x00
,
0x00
,
...
...
@@ -3689,6 +3694,7 @@ static void test_emf_GetPath(void)
ok
(
ret
,
"LineTo error %d.
\n
"
,
GetLastError
());
Rectangle
(
hdcMetafile
,
10
,
10
,
20
,
20
);
Arc
(
hdcMetafile
,
21
,
21
,
39
,
29
,
39
,
29
,
21
,
21
);
ArcTo
(
hdcMetafile
,
23
,
23
,
37
,
27
,
37
,
27
,
23
,
23
);
Chord
(
hdcMetafile
,
21
,
21
,
39
,
29
,
39
,
29
,
21
,
21
);
Pie
(
hdcMetafile
,
21
,
21
,
39
,
29
,
39
,
29
,
21
,
21
);
Ellipse
(
hdcMetafile
,
10
,
10
,
20
,
20
);
...
...
@@ -3698,7 +3704,7 @@ static void test_emf_GetPath(void)
EndPath
(
hdcMetafile
);
size
=
GetPath
(
hdcMetafile
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
size
==
77
,
"GetPath returned %d.
\n
"
,
size
);
todo_wine
ok
(
size
==
88
,
"GetPath returned %d.
\n
"
,
size
);
hemf
=
CloseEnhMetaFile
(
hdcMetafile
);
ok
(
hemf
!=
0
,
"CloseEnhMetaFile error %d
\n
"
,
GetLastError
());
...
...
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