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
67520eba
Commit
67520eba
authored
Jul 29, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Jul 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Pass a DC pointer to get_gdi_flat_path().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0c1e4223
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
graphics.c
dlls/gdi32/dibdrv/graphics.c
+2
-1
graphics.c
dlls/gdi32/enhmfdrv/graphics.c
+2
-1
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-1
path.c
dlls/gdi32/path.c
+2
-6
No files found.
dlls/gdi32/dibdrv/graphics.c
View file @
67520eba
...
...
@@ -408,6 +408,7 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
/* helper for path stroking and filling functions */
static
BOOL
stroke_and_fill_path
(
dibdrv_physdev
*
dev
,
BOOL
stroke
,
BOOL
fill
)
{
DC
*
dc
=
get_physdev_dc
(
&
dev
->
dev
);
struct
gdi_path
*
path
;
POINT
*
points
;
BYTE
*
types
;
...
...
@@ -417,7 +418,7 @@ static BOOL stroke_and_fill_path( dibdrv_physdev *dev, BOOL stroke, BOOL fill )
if
(
dev
->
brush
.
style
==
BS_NULL
)
fill
=
FALSE
;
if
(
!
(
path
=
get_gdi_flat_path
(
d
ev
->
dev
.
hd
c
,
fill
?
&
interior
:
NULL
)))
return
FALSE
;
if
(
!
(
path
=
get_gdi_flat_path
(
dc
,
fill
?
&
interior
:
NULL
)))
return
FALSE
;
if
(
!
(
total
=
get_gdi_path_data
(
path
,
&
points
,
&
types
)))
goto
done
;
if
(
stroke
&&
dev
->
pen_uses_region
)
outline
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
...
...
dlls/gdi32/enhmfdrv/graphics.c
View file @
67520eba
...
...
@@ -99,6 +99,7 @@ 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
)
{
DC
*
dc
=
get_physdev_dc
(
dev
);
EMRSTROKEANDFILLPATH
emr
;
struct
gdi_path
*
path
;
POINT
*
points
;
...
...
@@ -107,7 +108,7 @@ static BOOL emfdrv_stroke_and_fill_path( PHYSDEV dev, INT type )
emr
.
emr
.
iType
=
type
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
if
((
path
=
get_gdi_flat_path
(
d
ev
->
hd
c
,
NULL
)))
if
((
path
=
get_gdi_flat_path
(
dc
,
NULL
)))
{
int
count
=
get_gdi_path_data
(
path
,
&
points
,
&
flags
);
get_points_bounds
(
&
emr
.
rclBounds
,
points
,
count
,
0
);
...
...
dlls/gdi32/gdi_private.h
View file @
67520eba
...
...
@@ -334,7 +334,7 @@ typedef struct
/* path.c */
extern
void
free_gdi_path
(
struct
gdi_path
*
path
)
DECLSPEC_HIDDEN
;
extern
struct
gdi_path
*
get_gdi_flat_path
(
HDC
h
dc
,
HRGN
*
rgn
)
DECLSPEC_HIDDEN
;
extern
struct
gdi_path
*
get_gdi_flat_path
(
DC
*
dc
,
HRGN
*
rgn
)
DECLSPEC_HIDDEN
;
extern
int
get_gdi_path_data
(
struct
gdi_path
*
path
,
POINT
**
points
,
BYTE
**
flags
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_SavePath
(
DC
*
dst
,
DC
*
src
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_RestorePath
(
DC
*
dst
,
DC
*
src
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/path.c
View file @
67520eba
...
...
@@ -536,24 +536,20 @@ static BOOL PATH_DoArcPart(struct gdi_path *pPath, FLOAT_POINT corners[],
/* retrieve a flattened path in device coordinates, and optionally its region */
/* the DC path is deleted; the returned data must be freed by caller using free_gdi_path() */
/* helper for stroke_and_fill_path in the DIB driver */
struct
gdi_path
*
get_gdi_flat_path
(
HDC
h
dc
,
HRGN
*
rgn
)
struct
gdi_path
*
get_gdi_flat_path
(
DC
*
dc
,
HRGN
*
rgn
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
struct
gdi_path
*
ret
=
NULL
;
if
(
!
dc
)
return
NULL
;
if
(
dc
->
path
)
{
ret
=
PATH_FlattenPath
(
dc
->
path
);
free_gdi_path
(
dc
->
path
);
dc
->
path
=
NULL
;
if
(
ret
&&
rgn
)
*
rgn
=
path_to_region
(
ret
,
GetPolyFillMode
(
hdc
)
);
if
(
ret
&&
rgn
)
*
rgn
=
path_to_region
(
ret
,
dc
->
polyFillMode
);
}
else
SetLastError
(
ERROR_CAN_NOT_COMPLETE
);
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
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