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
d4889bef
Commit
d4889bef
authored
Oct 25, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement the polygon entry points in the path driver.
parent
ac00dfc9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
56 deletions
+42
-56
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-2
painting.c
dlls/gdi32/painting.c
+4
-12
path.c
dlls/gdi32/path.c
+38
-42
No files found.
dlls/gdi32/gdi_private.h
View file @
d4889bef
...
...
@@ -329,9 +329,7 @@ extern BOOL PATH_ExtTextOut(DC *dc, INT x, INT y, UINT flags, const RECT *lprc,
LPCWSTR
str
,
UINT
count
,
const
INT
*
dx
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_PolylineTo
(
DC
*
dc
,
const
POINT
*
pt
,
DWORD
cbCount
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_Polyline
(
DC
*
dc
,
const
POINT
*
pt
,
DWORD
cbCount
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_Polygon
(
DC
*
dc
,
const
POINT
*
pt
,
DWORD
cbCount
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_PolyPolyline
(
DC
*
dc
,
const
POINT
*
pt
,
const
DWORD
*
counts
,
DWORD
polylines
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_PolyPolygon
(
DC
*
dc
,
const
POINT
*
pt
,
const
INT
*
counts
,
UINT
polygons
)
DECLSPEC_HIDDEN
;
/* painting.c */
extern
POINT
*
GDI_Bezier
(
const
POINT
*
Points
,
INT
count
,
INT
*
nPtsOut
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/painting.c
View file @
d4889bef
...
...
@@ -777,13 +777,9 @@ BOOL WINAPI Polygon( HDC hdc, const POINT* pt, INT count )
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pPolygon
);
update_dc
(
dc
);
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_Polygon
(
dc
,
pt
,
count
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pPolygon
);
ret
=
physdev
->
funcs
->
pPolygon
(
physdev
,
pt
,
count
);
}
ret
=
physdev
->
funcs
->
pPolygon
(
physdev
,
pt
,
count
);
release_dc_ptr
(
dc
);
}
return
ret
;
...
...
@@ -801,13 +797,9 @@ BOOL WINAPI PolyPolygon( HDC hdc, const POINT* pt, const INT* counts,
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pPolyPolygon
);
update_dc
(
dc
);
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_PolyPolygon
(
dc
,
pt
,
counts
,
polygons
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pPolyPolygon
);
ret
=
physdev
->
funcs
->
pPolyPolygon
(
physdev
,
pt
,
counts
,
polygons
);
}
ret
=
physdev
->
funcs
->
pPolyPolygon
(
physdev
,
pt
,
counts
,
polygons
);
release_dc_ptr
(
dc
);
}
return
ret
;
...
...
dlls/gdi32/path.c
View file @
d4889bef
...
...
@@ -1373,51 +1373,47 @@ BOOL PATH_PolylineTo(DC *dc, const POINT *pts, DWORD cbPoints)
}
BOOL
PATH_Polygon
(
DC
*
dc
,
const
POINT
*
pts
,
DWORD
cbPoints
)
/*************************************************************
* pathdrv_Polygon
*/
static
BOOL
pathdrv_Polygon
(
PHYSDEV
dev
,
const
POINT
*
pts
,
INT
cbPoints
)
{
GdiPath
*
pPath
=
&
dc
->
path
;
POINT
pt
;
UINT
i
;
/* Check that path is open */
if
(
pPath
->
state
!=
PATH_Open
)
return
FALSE
;
struct
path_physdev
*
physdev
=
get_path_physdev
(
dev
);
POINT
pt
;
INT
i
;
for
(
i
=
0
;
i
<
cbPoints
;
i
++
)
{
pt
=
pts
[
i
];
if
(
!
LPtoDP
(
dc
->
hSelf
,
&
pt
,
1
))
return
FALSE
;
PATH_AddEntry
(
pPath
,
&
pt
,
(
i
==
0
)
?
PT_MOVETO
:
((
i
==
cbPoints
-
1
)
?
PT_LINETO
|
PT_CLOSEFIGURE
:
PT_LINETO
));
}
return
TRUE
;
for
(
i
=
0
;
i
<
cbPoints
;
i
++
)
{
pt
=
pts
[
i
];
LPtoDP
(
dev
->
hdc
,
&
pt
,
1
);
PATH_AddEntry
(
physdev
->
path
,
&
pt
,
(
i
==
0
)
?
PT_MOVETO
:
((
i
==
cbPoints
-
1
)
?
PT_LINETO
|
PT_CLOSEFIGURE
:
PT_LINETO
));
}
return
TRUE
;
}
BOOL
PATH_PolyPolygon
(
DC
*
dc
,
const
POINT
*
pts
,
const
INT
*
counts
,
UINT
polygons
)
{
GdiPath
*
pPath
=
&
dc
->
path
;
POINT
pt
,
startpt
;
UINT
poly
,
i
;
INT
point
;
/* Check that path is open */
if
(
pPath
->
state
!=
PATH_Open
)
return
FALSE
;
for
(
i
=
0
,
poly
=
0
;
poly
<
polygons
;
poly
++
)
{
for
(
point
=
0
;
point
<
counts
[
poly
];
point
++
,
i
++
)
{
pt
=
pts
[
i
];
if
(
!
LPtoDP
(
dc
->
hSelf
,
&
pt
,
1
))
return
FALSE
;
if
(
point
==
0
)
startpt
=
pt
;
PATH_AddEntry
(
pPath
,
&
pt
,
(
point
==
0
)
?
PT_MOVETO
:
PT_LINETO
);
}
/* win98 adds an extra line to close the figure for some reason */
PATH_AddEntry
(
pPath
,
&
startpt
,
PT_LINETO
|
PT_CLOSEFIGURE
);
}
return
TRUE
;
/*************************************************************
* pathdrv_PolyPolygon
*/
static
BOOL
pathdrv_PolyPolygon
(
PHYSDEV
dev
,
const
POINT
*
pts
,
const
INT
*
counts
,
UINT
polygons
)
{
struct
path_physdev
*
physdev
=
get_path_physdev
(
dev
);
POINT
pt
,
startpt
;
UINT
poly
,
i
;
INT
point
;
for
(
i
=
0
,
poly
=
0
;
poly
<
polygons
;
poly
++
)
{
for
(
point
=
0
;
point
<
counts
[
poly
];
point
++
,
i
++
)
{
pt
=
pts
[
i
];
LPtoDP
(
dev
->
hdc
,
&
pt
,
1
);
if
(
point
==
0
)
startpt
=
pt
;
PATH_AddEntry
(
physdev
->
path
,
&
pt
,
(
point
==
0
)
?
PT_MOVETO
:
PT_LINETO
);
}
/* win98 adds an extra line to close the figure for some reason */
PATH_AddEntry
(
physdev
->
path
,
&
startpt
,
PT_LINETO
|
PT_CLOSEFIGURE
);
}
return
TRUE
;
}
BOOL
PATH_PolyPolyline
(
DC
*
dc
,
const
POINT
*
pts
,
const
DWORD
*
counts
,
...
...
@@ -2362,9 +2358,9 @@ const struct gdi_dc_funcs path_driver =
pathdrv_PolyBezier
,
/* pPolyBezier */
pathdrv_PolyBezierTo
,
/* pPolyBezierTo */
pathdrv_PolyDraw
,
/* pPolyDraw */
NULL
,
/* pPolyPolygon */
pathdrv_PolyPolygon
,
/* pPolyPolygon */
NULL
,
/* pPolyPolyline */
NULL
,
/* pPolygon */
pathdrv_Polygon
,
/* pPolygon */
NULL
,
/* pPolyline */
NULL
,
/* pPolylineTo */
NULL
,
/* pPutImage */
...
...
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