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
c7bbc830
Commit
c7bbc830
authored
Jun 21, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement bounds for FillPath, StrokeAndFillPath and StrokePath in enhanced metafiles.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
625ff9b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
48 deletions
+67
-48
dc.c
dlls/gdi32/enhmfdrv/dc.c
+0
-42
graphics.c
dlls/gdi32/enhmfdrv/graphics.c
+50
-0
metafile.c
dlls/gdi32/tests/metafile.c
+17
-6
No files found.
dlls/gdi32/enhmfdrv/dc.c
View file @
c7bbc830
...
...
@@ -471,20 +471,6 @@ BOOL EMFDRV_EndPath( PHYSDEV dev )
return
FALSE
;
/* always fails without a path */
}
BOOL
EMFDRV_FillPath
(
PHYSDEV
dev
)
{
EMRFILLPATH
emr
;
emr
.
emr
.
iType
=
EMR_FILLPATH
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
FIXME
(
"Bounds
\n
"
);
emr
.
rclBounds
.
left
=
0
;
emr
.
rclBounds
.
top
=
0
;
emr
.
rclBounds
.
right
=
0
;
emr
.
rclBounds
.
bottom
=
0
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
BOOL
EMFDRV_FlattenPath
(
PHYSDEV
dev
)
{
EMRFLATTENPATH
emr
;
...
...
@@ -508,34 +494,6 @@ BOOL EMFDRV_SelectClipPath( PHYSDEV dev, INT iMode )
return
next
->
funcs
->
pSelectClipPath
(
next
,
iMode
);
}
BOOL
EMFDRV_StrokeAndFillPath
(
PHYSDEV
dev
)
{
EMRSTROKEANDFILLPATH
emr
;
emr
.
emr
.
iType
=
EMR_STROKEANDFILLPATH
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
FIXME
(
"Bounds
\n
"
);
emr
.
rclBounds
.
left
=
0
;
emr
.
rclBounds
.
top
=
0
;
emr
.
rclBounds
.
right
=
0
;
emr
.
rclBounds
.
bottom
=
0
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
BOOL
EMFDRV_StrokePath
(
PHYSDEV
dev
)
{
EMRSTROKEPATH
emr
;
emr
.
emr
.
iType
=
EMR_STROKEPATH
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
FIXME
(
"Bounds
\n
"
);
emr
.
rclBounds
.
left
=
0
;
emr
.
rclBounds
.
top
=
0
;
emr
.
rclBounds
.
right
=
0
;
emr
.
rclBounds
.
bottom
=
0
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
BOOL
EMFDRV_WidenPath
(
PHYSDEV
dev
)
{
EMRWIDENPATH
emr
;
...
...
dlls/gdi32/enhmfdrv/graphics.c
View file @
c7bbc830
...
...
@@ -96,6 +96,32 @@ static void get_points_bounds( RECTL *bounds, const POINT *pts, UINT count, HDC
}
}
/* helper for path stroke and fill functions */
static
BOOL
emfdrv_stroke_and_fill_path
(
PHYSDEV
dev
,
INT
type
)
{
EMRSTROKEANDFILLPATH
emr
;
int
count
;
POINT
*
points
;
BYTE
*
flags
;
emr
.
emr
.
iType
=
type
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
count
=
get_gdi_flat_path
(
dev
->
hdc
,
&
points
,
&
flags
,
NULL
);
if
(
count
>=
0
)
{
get_points_bounds
(
&
emr
.
rclBounds
,
points
,
count
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
points
);
HeapFree
(
GetProcessHeap
(),
0
,
flags
);
}
else
emr
.
rclBounds
=
empty_bounds
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
FALSE
;
if
(
count
<
0
)
return
FALSE
;
EMFDRV_UpdateBBox
(
dev
,
&
emr
.
rclBounds
);
return
TRUE
;
}
/**********************************************************************
* EMFDRV_MoveTo
*/
...
...
@@ -961,3 +987,27 @@ BOOL EMFDRV_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert,
HeapFree
(
GetProcessHeap
(),
0
,
emr
);
return
ret
;
}
/**********************************************************************
* EMFDRV_FillPath
*/
BOOL
EMFDRV_FillPath
(
PHYSDEV
dev
)
{
return
emfdrv_stroke_and_fill_path
(
dev
,
EMR_FILLPATH
);
}
/**********************************************************************
* EMFDRV_StrokeAndFillPath
*/
BOOL
EMFDRV_StrokeAndFillPath
(
PHYSDEV
dev
)
{
return
emfdrv_stroke_and_fill_path
(
dev
,
EMR_STROKEANDFILLPATH
);
}
/**********************************************************************
* EMFDRV_MoveTo
*/
BOOL
EMFDRV_StrokePath
(
PHYSDEV
dev
)
{
return
emfdrv_stroke_and_fill_path
(
dev
,
EMR_STROKEPATH
);
}
dlls/gdi32/tests/metafile.c
View file @
c7bbc830
...
...
@@ -3583,12 +3583,12 @@ static void test_emf_polybezier(void)
static
const
unsigned
char
EMF_PATH_BITS
[]
=
{
0x01
,
0x00
,
0x00
,
0x00
,
0x6c
,
0x00
,
0x00
,
0x00
,
0x0
0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x
ff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x
00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x
d8
,
0xff
,
0xff
,
0xff
,
0xd8
,
0xff
,
0xff
,
0xff
,
0x0
a
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x00
,
0x00
,
0x
96
,
0x00
,
0x00
,
0x00
,
0x96
,
0x00
,
0x00
,
0x00
,
0x
90
,
0x01
,
0x00
,
0x00
,
0x90
,
0x01
,
0x00
,
0x00
,
0x
70
,
0x17
,
0x00
,
0x00
,
0x70
,
0x17
,
0x00
,
0x00
,
0x20
,
0x45
,
0x4d
,
0x46
,
0x00
,
0x00
,
0x01
,
0x00
,
0x
c8
,
0x02
,
0x00
,
0x00
,
0x15
,
0x00
,
0x00
,
0x00
,
0x
f8
,
0x02
,
0x00
,
0x00
,
0x17
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x20
,
0x03
,
0x00
,
0x00
,
0x58
,
0x02
,
0x00
,
0x00
,
...
...
@@ -3668,7 +3668,13 @@ static const unsigned char EMF_PATH_BITS[] =
0x25
,
0x00
,
0x00
,
0x00
,
0x24
,
0x00
,
0x00
,
0x00
,
0x17
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xb4
,
0x42
,
0x00
,
0x00
,
0x34
,
0x43
,
0x3c
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x0e
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x3f
,
0x00
,
0x00
,
0x00
,
0x18
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x00
,
0x00
,
0x96
,
0x00
,
0x00
,
0x00
,
0x96
,
0x00
,
0x00
,
0x00
,
0x3f
,
0x00
,
0x00
,
0x00
,
0x18
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x0e
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x10
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
};
...
...
@@ -3745,6 +3751,11 @@ static void test_emf_paths(void)
size
=
GetPath
(
hdcMetafile
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
size
==
112
,
"GetPath returned %d.
\n
"
,
size
);
ret
=
StrokeAndFillPath
(
hdcMetafile
);
ok
(
ret
,
"StrokeAndFillPath failed err %d
\n
"
,
GetLastError
()
);
ret
=
StrokeAndFillPath
(
hdcMetafile
);
ok
(
!
ret
,
"StrokeAndFillPath succeeded
\n
"
);
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