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
ea5fa7dd
Commit
ea5fa7dd
authored
Apr 13, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Map all the points at once in PolyPolyline, similarly to what PolyPolygon does.
parent
568afc21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
graphics.c
dlls/gdi32/dibdrv/graphics.c
+9
-10
No files found.
dlls/gdi32/dibdrv/graphics.c
View file @
ea5fa7dd
...
...
@@ -949,19 +949,21 @@ BOOL dibdrv_PolyPolygon( PHYSDEV dev, const POINT *pt, const INT *counts, DWORD
BOOL
dibdrv_PolyPolyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
DWORD
*
counts
,
DWORD
polylines
)
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
DWORD
max_points
=
0
,
i
;
DWORD
total
,
pos
,
i
;
POINT
*
points
;
BOOL
ret
=
TRUE
;
HRGN
outline
=
0
;
for
(
i
=
0
;
i
<
polylines
;
i
++
)
for
(
i
=
total
=
0
;
i
<
polylines
;
i
++
)
{
if
(
counts
[
i
]
<
2
)
return
FALSE
;
max_points
=
max
(
counts
[
i
],
max_points
)
;
total
+=
counts
[
i
]
;
}
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
max_points
*
sizeof
(
*
pt
)
);
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
*
pt
)
);
if
(
!
points
)
return
FALSE
;
memcpy
(
points
,
pt
,
total
*
sizeof
(
*
pt
)
);
LPtoDP
(
dev
->
hdc
,
points
,
total
);
if
(
pdev
->
pen_uses_region
&&
!
(
outline
=
CreateRectRgn
(
0
,
0
,
0
,
0
)))
{
...
...
@@ -969,14 +971,11 @@ BOOL dibdrv_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWO
return
FALSE
;
}
for
(
i
=
0
;
i
<
polylines
;
i
++
)
for
(
i
=
pos
=
0
;
i
<
polylines
;
i
++
)
{
memcpy
(
points
,
pt
,
counts
[
i
]
*
sizeof
(
*
pt
)
);
pt
+=
counts
[
i
];
LPtoDP
(
dev
->
hdc
,
points
,
counts
[
i
]
);
reset_dash_origin
(
pdev
);
pdev
->
pen_lines
(
pdev
,
counts
[
i
],
points
,
FALSE
,
outline
);
pdev
->
pen_lines
(
pdev
,
counts
[
i
],
points
+
pos
,
FALSE
,
outline
);
pos
+=
counts
[
i
];
}
if
(
outline
)
...
...
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