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
57d20090
Commit
57d20090
authored
Jun 24, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a helper function to reverse an array of points in paths.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cac22620
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
path.c
dlls/gdi32/path.c
+18
-12
No files found.
dlls/gdi32/path.c
View file @
57d20090
...
@@ -276,6 +276,18 @@ static BYTE *add_points( struct gdi_path *path, const POINT *points, DWORD count
...
@@ -276,6 +276,18 @@ static BYTE *add_points( struct gdi_path *path, const POINT *points, DWORD count
return
ret
;
return
ret
;
}
}
/* reverse the order of an array of points */
static
void
reverse_points
(
POINT
*
points
,
UINT
count
)
{
UINT
i
;
for
(
i
=
0
;
i
<
count
/
2
;
i
++
)
{
POINT
pt
=
points
[
i
];
points
[
i
]
=
points
[
count
-
i
-
1
];
points
[
count
-
i
-
1
]
=
pt
;
}
}
/* start a new path stroke if necessary */
/* start a new path stroke if necessary */
static
BOOL
start_new_stroke
(
struct
path_physdev
*
physdev
)
static
BOOL
start_new_stroke
(
struct
path_physdev
*
physdev
)
{
{
...
@@ -1570,6 +1582,7 @@ static struct gdi_path *PATH_WidenPath(DC *dc)
...
@@ -1570,6 +1582,7 @@ static struct gdi_path *PATH_WidenPath(DC *dc)
INT
i
,
j
,
numStrokes
,
penWidth
,
penWidthIn
,
penWidthOut
,
size
,
penStyle
;
INT
i
,
j
,
numStrokes
,
penWidth
,
penWidthIn
,
penWidthOut
,
size
,
penStyle
;
struct
gdi_path
*
flat_path
,
*
pNewPath
,
**
pStrokes
=
NULL
,
*
pUpPath
,
*
pDownPath
;
struct
gdi_path
*
flat_path
,
*
pNewPath
,
**
pStrokes
=
NULL
,
*
pUpPath
,
*
pDownPath
;
EXTLOGPEN
*
elp
;
EXTLOGPEN
*
elp
;
BYTE
*
type
;
DWORD
obj_type
,
joint
,
endcap
,
penType
;
DWORD
obj_type
,
joint
,
endcap
,
penType
;
size
=
GetObjectW
(
dc
->
hPen
,
0
,
NULL
);
size
=
GetObjectW
(
dc
->
hPen
,
0
,
NULL
);
...
@@ -1828,18 +1841,11 @@ static struct gdi_path *PATH_WidenPath(DC *dc)
...
@@ -1828,18 +1841,11 @@ static struct gdi_path *PATH_WidenPath(DC *dc)
}
}
}
}
}
}
for
(
j
=
0
;
j
<
pUpPath
->
count
;
j
++
)
{
type
=
add_points
(
pNewPath
,
pUpPath
->
points
,
pUpPath
->
count
,
PT_LINETO
);
POINT
pt
;
type
[
0
]
=
PT_MOVETO
;
pt
.
x
=
pUpPath
->
points
[
j
].
x
;
reverse_points
(
pDownPath
->
points
,
pDownPath
->
count
);
pt
.
y
=
pUpPath
->
points
[
j
].
y
;
type
=
add_points
(
pNewPath
,
pDownPath
->
points
,
pDownPath
->
count
,
PT_LINETO
);
PATH_AddEntry
(
pNewPath
,
&
pt
,
(
j
==
0
?
PT_MOVETO
:
PT_LINETO
));
if
(
pStrokes
[
i
]
->
flags
[
pStrokes
[
i
]
->
count
-
1
]
&
PT_CLOSEFIGURE
)
type
[
0
]
=
PT_MOVETO
;
}
for
(
j
=
0
;
j
<
pDownPath
->
count
;
j
++
)
{
POINT
pt
;
pt
.
x
=
pDownPath
->
points
[
pDownPath
->
count
-
j
-
1
].
x
;
pt
.
y
=
pDownPath
->
points
[
pDownPath
->
count
-
j
-
1
].
y
;
PATH_AddEntry
(
pNewPath
,
&
pt
,
(
(
j
==
0
&&
(
pStrokes
[
i
]
->
flags
[
pStrokes
[
i
]
->
count
-
1
]
&
PT_CLOSEFIGURE
))
?
PT_MOVETO
:
PT_LINETO
));
}
free_gdi_path
(
pStrokes
[
i
]
);
free_gdi_path
(
pStrokes
[
i
]
);
free_gdi_path
(
pUpPath
);
free_gdi_path
(
pUpPath
);
...
...
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